; LLVM IR from abeaumont/competitive-programming :: codechef/may20a (nbots)

; 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::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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::chrono::duration" = type { i64 }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.38" = type { ptr }
%"class.std::tuple.28" = type { %"struct.std::_Tuple_impl.base.32", [3 x i8] }
%"struct.std::_Tuple_impl.base.32" = type <{ %"struct.std::_Tuple_impl.30", %"struct.std::_Head_base.31" }>
%"struct.std::_Tuple_impl.30" = type { %"struct.std::_Head_base.17" }
%"struct.std::_Head_base.17" = type { i32 }
%"struct.std::_Head_base.31" = type { i8 }

@n = external dso_local global i32, align 4
@f = external dso_local global i32, align 4
@t = external dso_local global %"class.std::vector", align 8
@generator = external dso_local global %"class.std::linear_congruential_engine", align 8
@r = external dso_local global %"class.std::vector.0", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23solve_greedy_randomnessv() #1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4readv() #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::chrono::duration", align 8
  %7 = alloca %"class.std::chrono::time_point", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::vector.5", align 8
  %10 = alloca %"class.std::allocator.7", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca [9 x i32], align 16
  %15 = alloca [9 x i32], align 16
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::chrono::duration", align 8
  %18 = alloca %"class.std::chrono::time_point", align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %22 = alloca %"class.std::tuple.28", align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 1
  br i1 %24, label %25, label %114

25:                                               ; preds = %2
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 2
  br i1 %27, label %28, label %34

28:                                               ; preds = %25
  %29 = load ptr, ptr %5, align 8, !tbaa !9
  %30 = getelementptr inbounds ptr, ptr %29, i64 2
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call i32 @atoi(ptr noundef %31) #10
  %33 = sext i32 %32 to i64
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE4seedEm(ptr noundef nonnull align 8 dereferenceable(8) @generator, i64 noundef %33)
  br label %41

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #11
  %35 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #11
  %36 = getelementptr inbounds %"class.std::chrono::time_point", ptr %7, i32 0, i32 0
  %37 = getelementptr inbounds %"class.std::chrono::duration", ptr %36, i32 0, i32 0
  store i64 %35, ptr %37, align 8
  %38 = call i64 @_ZNKSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEE16time_since_epochEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %39 = getelementptr inbounds %"class.std::chrono::duration", ptr %6, i32 0, i32 0
  store i64 %38, ptr %39, align 8
  %40 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE4seedEm(ptr noundef nonnull align 8 dereferenceable(8) @generator, i64 noundef %40)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #11
  br label %41

41:                                               ; preds = %34, %28
  store i32 512, ptr @f, align 4, !tbaa !5
  store i32 512, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #11
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #11
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #11
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #11
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %45, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %46 unwind label %105

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #11
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #11
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %43, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %47 unwind label %109

47:                                               ; preds = %46
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) @t, ptr noundef nonnull align 8 dereferenceable(24) %8) #11
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #11
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #11
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #11
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #11
  call void @llvm.lifetime.start.p0(i64 36, ptr %14) #11
  store i32 1, ptr %14, align 4, !tbaa !5
  %49 = getelementptr inbounds i32, ptr %14, i64 1
  store i32 1, ptr %49, align 4, !tbaa !5
  %50 = getelementptr inbounds i32, ptr %14, i64 2
  store i32 1, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds i32, ptr %14, i64 3
  store i32 1, ptr %51, align 4, !tbaa !5
  %52 = getelementptr inbounds i32, ptr %14, i64 4
  %53 = load i32, ptr @f, align 4, !tbaa !5
  %54 = sdiv i32 %53, 4
  store i32 %54, ptr %52, align 4, !tbaa !5
  %55 = getelementptr inbounds i32, ptr %14, i64 5
  %56 = load i32, ptr @f, align 4, !tbaa !5
  %57 = sdiv i32 %56, 4
  store i32 %57, ptr %55, align 4, !tbaa !5
  %58 = getelementptr inbounds i32, ptr %14, i64 6
  %59 = load i32, ptr @f, align 4, !tbaa !5
  %60 = sdiv i32 %59, 4
  store i32 %60, ptr %58, align 4, !tbaa !5
  %61 = getelementptr inbounds i32, ptr %14, i64 7
  %62 = load i32, ptr @f, align 4, !tbaa !5
  %63 = sdiv i32 %62, 2
  store i32 %63, ptr %61, align 4, !tbaa !5
  %64 = getelementptr inbounds i32, ptr %14, i64 8
  %65 = load i32, ptr @f, align 4, !tbaa !5
  %66 = sdiv i32 %65, 2
  store i32 %66, ptr %64, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %15) #11
  %67 = load i32, ptr @f, align 4, !tbaa !5
  %68 = sdiv i32 %67, 4
  store i32 %68, ptr %15, align 4, !tbaa !5
  %69 = getelementptr inbounds i32, ptr %15, i64 1
  %70 = load i32, ptr @f, align 4, !tbaa !5
  %71 = sdiv i32 %70, 2
  store i32 %71, ptr %69, align 4, !tbaa !5
  %72 = getelementptr inbounds i32, ptr %15, i64 2
  %73 = load i32, ptr @f, align 4, !tbaa !5
  %74 = mul nsw i32 3, %73
  %75 = sdiv i32 %74, 4
  store i32 %75, ptr %72, align 4, !tbaa !5
  %76 = getelementptr inbounds i32, ptr %15, i64 3
  %77 = load i32, ptr @f, align 4, !tbaa !5
  store i32 %77, ptr %76, align 4, !tbaa !5
  %78 = getelementptr inbounds i32, ptr %15, i64 4
  %79 = load i32, ptr @f, align 4, !tbaa !5
  %80 = sdiv i32 %79, 2
  store i32 %80, ptr %78, align 4, !tbaa !5
  %81 = getelementptr inbounds i32, ptr %15, i64 5
  %82 = load i32, ptr @f, align 4, !tbaa !5
  %83 = mul nsw i32 3, %82
  %84 = sdiv i32 %83, 4
  store i32 %84, ptr %81, align 4, !tbaa !5
  %85 = getelementptr inbounds i32, ptr %15, i64 6
  %86 = load i32, ptr @f, align 4, !tbaa !5
  store i32 %86, ptr %85, align 4, !tbaa !5
  %87 = getelementptr inbounds i32, ptr %15, i64 7
  %88 = load i32, ptr @f, align 4, !tbaa !5
  %89 = mul nsw i32 3, %88
  %90 = sdiv i32 %89, 4
  store i32 %90, ptr %87, align 4, !tbaa !5
  %91 = getelementptr inbounds i32, ptr %15, i64 8
  %92 = load i32, ptr @f, align 4, !tbaa !5
  store i32 %92, ptr %91, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #11
  %93 = load ptr, ptr %5, align 8, !tbaa !9
  %94 = getelementptr inbounds ptr, ptr %93, i64 1
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = call i32 @atoi(ptr noundef %95) #10
  store i32 %96, ptr %16, align 4, !tbaa !5
  %97 = load i32, ptr %16, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [9 x i32], ptr %14, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = load i32, ptr %16, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [9 x i32], ptr %15, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  call void @_Z8generateii(i32 noundef %100, i32 noundef %104)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 36, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 36, ptr %14) #11
  br label %121

105:                                              ; preds = %41
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %11, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %12, align 4
  br label %113

109:                                              ; preds = %46
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %12, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #11
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #11
  br label %113

113:                                              ; preds = %109, %105
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #11
  br label %150

114:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #11
  %115 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #11
  %116 = getelementptr inbounds %"class.std::chrono::time_point", ptr %18, i32 0, i32 0
  %117 = getelementptr inbounds %"class.std::chrono::duration", ptr %116, i32 0, i32 0
  store i64 %115, ptr %117, align 8
  %118 = call i64 @_ZNKSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEE16time_since_epochEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
  %119 = getelementptr inbounds %"class.std::chrono::duration", ptr %17, i32 0, i32 0
  store i64 %118, ptr %119, align 8
  %120 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE4seedEm(ptr noundef nonnull align 8 dereferenceable(8) @generator, i64 noundef %120)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #11
  call void @_Z4readv()
  br label %121

121:                                              ; preds = %114, %47
  call void @_Z23solve_greedy_randomnessv()
  %122 = call noundef i64 @_ZNKSt6vectorISt5tupleIJciEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #11
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %122)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %123, i8 noundef signext 10)
  %125 = load i32, ptr %4, align 4, !tbaa !5
  %126 = icmp sle i32 %125, 1
  br i1 %126, label %127, label %148

127:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #11
  store ptr @r, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #11
  %128 = call ptr @_ZNSt6vectorISt5tupleIJciEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #11
  %129 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %20, i32 0, i32 0
  store ptr %128, ptr %129, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #11
  %130 = call ptr @_ZNSt6vectorISt5tupleIJciEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #11
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %21, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  br label %132

132:                                              ; preds = %145, %127
  %133 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJciEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #11
  br i1 %133, label %135, label %134

134:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  br label %147

135:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #11
  %136 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJciEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %136, i64 8, i1 false)
  %137 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3getILm0EJciEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(5) %22) #11
  %138 = load i8, ptr %137, align 1, !tbaa !11
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %138)
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %139, i8 noundef signext 32)
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJciEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(5) %22) #11
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %140, i32 noundef %142)
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %143, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  br label %145

145:                                              ; preds = %135
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJciEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #11
  br label %132

147:                                              ; preds = %134
  br label %148

148:                                              ; preds = %147, %121
  %149 = load i32, ptr %3, align 4
  ret i32 %149

150:                                              ; preds = %113
  %151 = load ptr, ptr %11, align 8
  %152 = load i32, ptr %12, align 4
  %153 = insertvalue { ptr, i32 } poison, ptr %151, 0
  %154 = insertvalue { ptr, i32 } %153, i32 %152, 1
  resume { ptr, i32 } %154
}

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

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #5

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 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 @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3getILm0EJciEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(5)) #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #9

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

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

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

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

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

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

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


; 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::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<char, int>, std::allocator<std::tuple<char, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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::chrono::duration" = type { i64 }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.38" = type { ptr }
%"class.std::tuple.28" = type { %"struct.std::_Tuple_impl.base.32", [3 x i8] }
%"struct.std::_Tuple_impl.base.32" = type <{ %"struct.std::_Tuple_impl.30", %"struct.std::_Head_base.31" }>
%"struct.std::_Tuple_impl.30" = type { %"struct.std::_Head_base.17" }
%"struct.std::_Head_base.17" = type { i32 }
%"struct.std::_Head_base.31" = type { i8 }

@n = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local local_unnamed_addr global i32, align 4
@t = external dso_local global %"class.std::vector", align 8
@generator = external dso_local global %"class.std::linear_congruential_engine", align 8
@r = external dso_local global %"class.std::vector.0", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23solve_greedy_randomnessv() local_unnamed_addr #1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) 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) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4readv() local_unnamed_addr #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::chrono::duration", align 8
  %4 = alloca %"class.std::chrono::time_point", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::vector.5", align 8
  %7 = alloca %"class.std::allocator.7", align 1
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca [9 x i32], align 16
  %10 = alloca [9 x i32], align 16
  %11 = alloca %"class.std::chrono::duration", align 8
  %12 = alloca %"class.std::chrono::time_point", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %15 = alloca %"class.std::tuple.28", align 8
  %16 = icmp sgt i32 %0, 1
  br i1 %16, label %17, label %62

17:                                               ; preds = %2
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %23, label %18

18:                                               ; preds = %17
  %19 = getelementptr inbounds i8, ptr %1, i64 16
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = tail call i32 @atoi(ptr nocapture noundef %20) #9
  %22 = sext i32 %21 to i64
  tail call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE4seedEm(ptr noundef nonnull align 8 dereferenceable(8) @generator, i64 noundef %22)
  br label %27

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  %24 = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #10
  store i64 %24, ptr %4, align 8
  %25 = call i64 @_ZNKSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEE16time_since_epochEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i64 %25, ptr %3, align 8
  %26 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE4seedEm(ptr noundef nonnull align 8 dereferenceable(8) @generator, i64 noundef %26)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  br label %27

27:                                               ; preds = %23, %18
  store i32 512, ptr @f, align 4, !tbaa !9
  store i32 512, ptr @n, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #10
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #10
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 512, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %28 unwind label %57

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #10
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 512, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %29 unwind label %59

29:                                               ; preds = %28
  %30 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) @t, ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #10
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %9) #10
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %9, align 16, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %9, i64 16
  %32 = load i32, ptr @f, align 4, !tbaa !9
  %33 = sdiv i32 %32, 4
  store i32 %33, ptr %31, align 16, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %9, i64 20
  store i32 %33, ptr %34, align 4, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %9, i64 24
  store i32 %33, ptr %35, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %9, i64 28
  %37 = sdiv i32 %32, 2
  store i32 %37, ptr %36, align 4, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %9, i64 32
  store i32 %37, ptr %38, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %10) #10
  store i32 %33, ptr %10, align 16, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 %37, ptr %39, align 4, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %10, i64 8
  %41 = mul nsw i32 %32, 3
  %42 = sdiv i32 %41, 4
  store i32 %42, ptr %40, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %10, i64 12
  store i32 %32, ptr %43, align 4, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %10, i64 16
  store i32 %37, ptr %44, align 16, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %10, i64 20
  store i32 %42, ptr %45, align 4, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %10, i64 24
  store i32 %32, ptr %46, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %10, i64 28
  store i32 %42, ptr %47, align 4, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %10, i64 32
  store i32 %32, ptr %48, align 16, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %1, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = call i32 @atoi(ptr nocapture noundef %50) #9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = getelementptr inbounds [9 x i32], ptr %10, i64 0, i64 %52
  %56 = load i32, ptr %55, align 4, !tbaa !9
  call void @_Z8generateii(i32 noundef %54, i32 noundef %56)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #10
  br label %66

57:                                               ; preds = %27
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %28
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #10
  br label %61

61:                                               ; preds = %59, %57
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #10
  resume { ptr, i32 } %.pn

62:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #10
  %63 = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #10
  store i64 %63, ptr %12, align 8
  %64 = call i64 @_ZNKSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEE16time_since_epochEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  store i64 %64, ptr %11, align 8
  %65 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE4seedEm(ptr noundef nonnull align 8 dereferenceable(8) @generator, i64 noundef %65)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @_Z4readv()
  br label %66

66:                                               ; preds = %62, %29
  call void @_Z23solve_greedy_randomnessv()
  %67 = call noundef i64 @_ZNKSt6vectorISt5tupleIJciEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #10
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %67)
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %68, i8 noundef signext 10)
  %70 = icmp slt i32 %0, 2
  br i1 %70, label %71, label %87

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  %72 = call ptr @_ZNSt6vectorISt5tupleIJciEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #10
  store ptr %72, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #10
  %73 = call ptr @_ZNSt6vectorISt5tupleIJciEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #10
  store ptr %73, ptr %14, align 8
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJciEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #10
  br i1 %74, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  br label %87

.lr.ph:                                           ; preds = %71, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  %75 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJciEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #10
  %76 = load i64, ptr %75, align 4
  store i64 %76, ptr %15, align 8
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3getILm0EJciEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(5) %15) #10
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %78)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %79, i8 noundef signext 32)
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJciEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(5) %15) #10
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %80, i32 noundef %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %83, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJciEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #10
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJciEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #10
  br i1 %86, label %.lr.ph, label %._crit_edge

87:                                               ; preds = %._crit_edge, %66
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 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 @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJciEESt6vectorIS2_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 1 dereferenceable(1) ptr @_ZSt3getILm0EJciEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(5)) local_unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #8

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass