; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Easy Medium/WALL (brute)

; 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::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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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" = type { i8 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.1" = type { ptr }

@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z12findPerFloydiPFiiE(i32 noundef, ptr noundef) #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 nounwind uwtable
declare dso_local noundef i32 @_Z3nxti(i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca %"class.std::tuple", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %27

27:                                               ; preds = %161, %0
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = add nsw i32 %28, -1
  store i32 %29, ptr %2, align 4, !tbaa !5
  %30 = icmp ne i32 %28, 0
  br i1 %30, label %31, label %169

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %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) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = add nsw i32 %35, -1
  store i32 %36, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %40 = load i32, ptr @m, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %42 unwind label %65

42:                                               ; preds = %31
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZrsIiERSiS0_RSt6vectorIT_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %44 unwind label %69

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = invoke i64 @_Z12findPerFloydiPFiiE(i32 noundef %45, ptr noundef @_Z3nxti)
          to label %47 unwind label %73

47:                                               ; preds = %44
  store i64 %46, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %13, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11) #6
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOSt4pairIS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = sub nsw i32 %49, %50
  %52 = load i32, ptr %11, align 4, !tbaa !5
  %53 = srem i32 %51, %52
  store i32 %53, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = sub nsw i32 %54, %55
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = sdiv i32 %56, %57
  store i32 %58, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %59 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %59, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %91, %47
  %61 = load i32, ptr %18, align 4, !tbaa !5
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %77, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %94

65:                                               ; preds = %31
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  br label %168

69:                                               ; preds = %42
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  br label %167

73:                                               ; preds = %44
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %8, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %166

77:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %78 = load i32, ptr %17, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %79) #6
  %81 = load i32, ptr %80, align 4, !tbaa !5
  store i32 %81, ptr %19, align 4, !tbaa !5
  %82 = load i32, ptr %17, align 4, !tbaa !5
  %83 = call noundef i32 @_Z3nxti(i32 noundef %82)
  store i32 %83, ptr %17, align 4, !tbaa !5
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = load i32, ptr %19, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = mul nsw i64 %85, %87
  %89 = load i64, ptr %16, align 8, !tbaa !9
  %90 = add nsw i64 %89, %88
  store i64 %90, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %91

91:                                               ; preds = %77
  %92 = load i32, ptr %18, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %18, align 4, !tbaa !5
  br label %60, !llvm.loop !11

94:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store i64 0, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %114, %94
  %96 = load i32, ptr %21, align 4, !tbaa !5
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %117

100:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %101 = load i32, ptr %17, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %102) #6
  %104 = load i32, ptr %103, align 4, !tbaa !5
  store i32 %104, ptr %22, align 4, !tbaa !5
  %105 = load i32, ptr %17, align 4, !tbaa !5
  %106 = call noundef i32 @_Z3nxti(i32 noundef %105)
  store i32 %106, ptr %17, align 4, !tbaa !5
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = load i32, ptr %22, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = mul nsw i64 %108, %110
  %112 = load i64, ptr %20, align 8, !tbaa !9
  %113 = add nsw i64 %112, %111
  store i64 %113, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %114

114:                                              ; preds = %100
  %115 = load i32, ptr %21, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %21, align 4, !tbaa !5
  br label %95, !llvm.loop !13

117:                                              ; preds = %99
  %118 = load i64, ptr %20, align 8, !tbaa !9
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = mul nsw i64 %118, %120
  %122 = load i64, ptr %16, align 8, !tbaa !9
  %123 = add nsw i64 %122, %121
  store i64 %123, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %143, %117
  %125 = load i32, ptr %23, align 4, !tbaa !5
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %146

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %130 = load i32, ptr %17, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %131) #6
  %133 = load i32, ptr %132, align 4, !tbaa !5
  store i32 %133, ptr %24, align 4, !tbaa !5
  %134 = load i32, ptr %17, align 4, !tbaa !5
  %135 = call noundef i32 @_Z3nxti(i32 noundef %134)
  store i32 %135, ptr %17, align 4, !tbaa !5
  %136 = load i32, ptr %3, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = load i32, ptr %24, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = mul nsw i64 %137, %139
  %141 = load i64, ptr %16, align 8, !tbaa !9
  %142 = add nsw i64 %141, %140
  store i64 %142, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %143

143:                                              ; preds = %129
  %144 = load i32, ptr %23, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %23, align 4, !tbaa !5
  br label %124, !llvm.loop !14

146:                                              ; preds = %128
  %147 = load i64, ptr %16, align 8, !tbaa !9
  %148 = sdiv i64 %147, 2
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %148)
          to label %150 unwind label %162

150:                                              ; preds = %146
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %149, ptr noundef @.str.1)
          to label %152 unwind label %162

152:                                              ; preds = %150
  %153 = load i64, ptr %16, align 8, !tbaa !9
  %154 = and i64 %153, 1
  %155 = icmp ne i64 %154, 0
  %156 = zext i1 %155 to i64
  %157 = select i1 %155, i32 5, i32 0
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %151, i32 noundef %157)
          to label %159 unwind label %162

159:                                              ; preds = %152
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %158, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %161 unwind label %162

161:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %27, !llvm.loop !15

162:                                              ; preds = %159, %152, %150, %146
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %8, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %166

166:                                              ; preds = %162, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %167

167:                                              ; preds = %166, %69
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %168

168:                                              ; preds = %167, %65
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %171

169:                                              ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %170 = load i32, ptr %1, align 4
  ret i32 %170

171:                                              ; preds = %168
  %172 = load ptr, ptr %8, align 8
  %173 = load i32, ptr %9, align 4
  %174 = insertvalue { ptr, i32 } poison, ptr %172, 0
  %175 = insertvalue { ptr, i32 } %174, i32 %173, 1
  resume { ptr, i32 } %175
}

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

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 nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { 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 #6 = { 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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; 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::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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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" = type { i8 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.1" = type { ptr }

@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z12findPerFloydiPFiiE(i32 noundef, ptr noundef) 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 nounwind uwtable
declare dso_local noundef i32 @_Z3nxti(i32 noundef) #2

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"class.std::tuple", align 8
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %1, align 4, !tbaa !5
  %.not59 = icmp eq i32 %13, 0
  br i1 %.not59, label %._crit_edge62, label %.lr.ph61

.lr.ph61:                                         ; preds = %0, %96
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %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) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %25 unwind label %42

25:                                               ; preds = %.lr.ph61
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  %26 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZrsIiERSiS0_RSt6vectorIT_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %27 unwind label %44

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = invoke i64 @_Z12findPerFloydiPFiiE(i32 noundef %28, ptr noundef nonnull @_Z3nxti)
          to label %30 unwind label %46

30:                                               ; preds = %27
  store i64 %29, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %10, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOSt4pairIS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = sub nsw i32 %32, %33
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = srem i32 %34, %35
  %37 = sdiv i32 %34, %35
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = icmp sgt i32 %33, 0
  br i1 %39, label %.lr.ph, label %.preheader

.preheader.loopexit:                              ; preds = %.lr.ph
  %.pre = load i32, ptr %8, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %30
  %40 = phi i32 [ %35, %30 ], [ %.pre, %.preheader.loopexit ]
  %.035.lcssa = phi i32 [ %38, %30 ], [ %51, %.preheader.loopexit ]
  %.032.lcssa = phi i64 [ 0, %30 ], [ %56, %.preheader.loopexit ]
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph49, label %._crit_edge

42:                                               ; preds = %.lr.ph61
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %103

44:                                               ; preds = %25
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %102

46:                                               ; preds = %27
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %101

.lr.ph:                                           ; preds = %30, %.lr.ph
  %.03244 = phi i64 [ %56, %.lr.ph ], [ 0, %30 ]
  %.03443 = phi i32 [ %57, %.lr.ph ], [ 0, %30 ]
  %.03542 = phi i32 [ %51, %.lr.ph ], [ %38, %30 ]
  %48 = sext i32 %.03542 to i64
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %48) #6
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = call noundef i32 @_Z3nxti(i32 noundef %.03542)
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = sext i32 %50 to i64
  %55 = mul nsw i64 %53, %54
  %56 = add nsw i64 %55, %.03244
  %57 = add nuw nsw i32 %.03443, 1
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %.lr.ph, label %.preheader.loopexit, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph49, %.preheader
  %.136.lcssa = phi i32 [ %.035.lcssa, %.preheader ], [ %67, %.lr.ph49 ]
  %.031.lcssa = phi i64 [ 0, %.preheader ], [ %72, %.lr.ph49 ]
  %60 = sext i32 %37 to i64
  %61 = mul nsw i64 %.031.lcssa, %60
  %62 = add nsw i64 %61, %.032.lcssa
  %63 = icmp sgt i32 %36, 0
  br i1 %63, label %.lr.ph56, label %._crit_edge57

.lr.ph49:                                         ; preds = %.preheader, %.lr.ph49
  %.03048 = phi i32 [ %73, %.lr.ph49 ], [ 0, %.preheader ]
  %.03147 = phi i64 [ %72, %.lr.ph49 ], [ 0, %.preheader ]
  %.13646 = phi i32 [ %67, %.lr.ph49 ], [ %.035.lcssa, %.preheader ]
  %64 = sext i32 %.13646 to i64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %64) #6
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = call noundef i32 @_Z3nxti(i32 noundef %.13646)
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = sext i32 %66 to i64
  %71 = mul nsw i64 %69, %70
  %72 = add nsw i64 %71, %.03147
  %73 = add nuw nsw i32 %.03048, 1
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %.lr.ph49, label %._crit_edge, !llvm.loop !11

._crit_edge57:                                    ; preds = %.lr.ph56, %._crit_edge
  %.133.lcssa = phi i64 [ %62, %._crit_edge ], [ %86, %.lr.ph56 ]
  %76 = sdiv i64 %.133.lcssa, 2
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %76)
          to label %88 unwind label %99

.lr.ph56:                                         ; preds = %._crit_edge, %.lr.ph56
  %.02654 = phi i32 [ %87, %.lr.ph56 ], [ 0, %._crit_edge ]
  %.13353 = phi i64 [ %86, %.lr.ph56 ], [ %62, %._crit_edge ]
  %.23752 = phi i32 [ %81, %.lr.ph56 ], [ %.136.lcssa, %._crit_edge ]
  %78 = sext i32 %.23752 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %78) #6
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = call noundef i32 @_Z3nxti(i32 noundef %.23752)
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = sext i32 %80 to i64
  %85 = mul nsw i64 %83, %84
  %86 = add nsw i64 %85, %.13353
  %87 = add nuw nsw i32 %.02654, 1
  %exitcond.not = icmp eq i32 %87, %36
  br i1 %exitcond.not, label %._crit_edge57, label %.lr.ph56, !llvm.loop !12

88:                                               ; preds = %._crit_edge57
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.1)
          to label %90 unwind label %99

90:                                               ; preds = %88
  %91 = and i64 %.133.lcssa, 1
  %.not38 = icmp eq i64 %91, 0
  %92 = select i1 %.not38, i32 0, i32 5
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef %92)
          to label %94 unwind label %99

94:                                               ; preds = %90
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %96 unwind label %99

96:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %97 = load i32, ptr %1, align 4, !tbaa !5
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %97, 0
  br i1 %.not, label %._crit_edge62, label %.lr.ph61, !llvm.loop !13

99:                                               ; preds = %94, %90, %88, %._crit_edge57
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %101

101:                                              ; preds = %99, %46
  %.pn = phi { ptr, i32 } [ %100, %99 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %102

102:                                              ; preds = %101, %44
  %.pn.pn = phi { ptr, i32 } [ %.pn, %101 ], [ %45, %44 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %103

103:                                              ; preds = %102, %42
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %102 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.pn

._crit_edge62:                                    ; preds = %96, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

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 nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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

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


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