; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 9/1890. Money out of Thin Air (main)

; 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<Node *, std::allocator<Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<Node *, std::allocator<Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Node *, std::allocator<Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Node *, std::allocator<Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.Node = type { i64, %"class.std::vector.5", i32, i32, i32, i32 }
%"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 }

@nodes = external dso_local global %"class.std::vector", align 8
@zp = external dso_local global %"class.std::vector.0", align 8
@delta = external dso_local global %"class.std::vector.0", align 8
@add = external dso_local global %"class.std::vector.0", align 8
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@s0 = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %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)
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  %31 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #10
  call void @llvm.memset.p0.i64(ptr align 16 %31, i8 0, i64 48, i1 false)
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #9
  store ptr %31, ptr %2, align 8, !tbaa !8
  call void @_ZNSt6vectorIP4NodeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @nodes, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  %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) @n)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) @q)
  %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) @s0)
  %35 = load i32, ptr @s0, align 4, !tbaa !11
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef 0) #9
  %38 = load ptr, ptr %37, align 8, !tbaa !8
  %39 = getelementptr inbounds %struct.Node, ptr %38, i32 0, i32 0
  store i64 %36, ptr %39, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store i32 1, ptr %3, align 4, !tbaa !11
  br label %40

40:                                               ; preds = %61, %0
  %41 = load i32, ptr %3, align 4, !tbaa !11
  %42 = load i32, ptr @n, align 4, !tbaa !11
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  %46 = 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)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %48 = load i32, ptr %4, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %49) #9
  %51 = load ptr, ptr %50, align 8, !tbaa !8
  %52 = getelementptr inbounds %struct.Node, ptr %51, i32 0, i32 1
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %53 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #10
  call void @llvm.memset.p0.i64(ptr align 16 %53, i8 0, i64 48, i1 false)
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %53) #9
  store ptr %53, ptr %6, align 8, !tbaa !8
  call void @_ZNSt6vectorIP4NodeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @nodes, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  %54 = load i32, ptr %5, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = load i32, ptr %3, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %57) #9
  %59 = load ptr, ptr %58, align 8, !tbaa !8
  %60 = getelementptr inbounds %struct.Node, ptr %59, i32 0, i32 0
  store i64 %55, ptr %60, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  br label %61

61:                                               ; preds = %45
  %62 = load i32, ptr %3, align 4, !tbaa !11
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %3, align 4, !tbaa !11
  br label %40, !llvm.loop !20

64:                                               ; preds = %44
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef 0) #9
  %66 = load ptr, ptr %65, align 8, !tbaa !8
  %67 = call noundef i32 @_ZN4Node8calcSizeEv(ptr noundef nonnull align 8 dereferenceable(48) %66)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef 0) #9
  %69 = load ptr, ptr %68, align 8, !tbaa !8
  call void @_ZN4Node5buildEi(ptr noundef nonnull align 8 dereferenceable(48) %69, i32 noundef 0)
  %70 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @zp) #9
  call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %70)
  %71 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @zp) #9
  call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %71)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 228, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %72

72:                                               ; preds = %90, %64
  %73 = load i32, ptr %8, align 4, !tbaa !11
  %74 = sext i32 %73 to i64
  %75 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @zp) #9
  %76 = icmp ult i64 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %93

78:                                               ; preds = %72
  %79 = load i32, ptr %8, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %80) #9
  %82 = load i64, ptr %81, align 8, !tbaa !22
  %83 = load i32, ptr %8, align 4, !tbaa !11
  %84 = load i32, ptr %7, align 4, !tbaa !11
  %85 = sdiv i32 %83, %84
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %86) #9
  %88 = load i64, ptr %87, align 8, !tbaa !22
  %89 = add nsw i64 %88, %82
  store i64 %89, ptr %87, align 8, !tbaa !22
  br label %90

90:                                               ; preds = %78
  %91 = load i32, ptr %8, align 4, !tbaa !11
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %8, align 4, !tbaa !11
  br label %72, !llvm.loop !23

93:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %94

94:                                               ; preds = %289, %93
  %95 = load i32, ptr %9, align 4, !tbaa !11
  %96 = load i32, ptr @q, align 4, !tbaa !11
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %293

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %100 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %101 unwind label %151

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %103 unwind label %151

103:                                              ; preds = %101
  %104 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %102, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %105 unwind label %151

105:                                              ; preds = %103
  %106 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %104, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %107 unwind label %151

107:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %108 = load i32, ptr %12, align 4, !tbaa !11
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %109) #9
  %111 = load ptr, ptr %110, align 8, !tbaa !8
  store ptr %111, ptr %17, align 8, !tbaa !8
  %112 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str)
          to label %113 unwind label %155

113:                                              ; preds = %107
  br i1 %112, label %114, label %160

114:                                              ; preds = %113
  %115 = load ptr, ptr %17, align 8, !tbaa !8
  %116 = getelementptr inbounds %struct.Node, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 4, !tbaa !24
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %118) #9
  %120 = load i64, ptr %119, align 8, !tbaa !22
  %121 = load ptr, ptr %17, align 8, !tbaa !8
  %122 = getelementptr inbounds %struct.Node, ptr %121, i32 0, i32 3
  %123 = load i32, ptr %122, align 4, !tbaa !24
  %124 = load i32, ptr %7, align 4, !tbaa !11
  %125 = sdiv i32 %123, %124
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %126) #9
  %128 = load i64, ptr %127, align 8, !tbaa !22
  %129 = add nsw i64 %120, %128
  %130 = load i64, ptr %13, align 8, !tbaa !22
  %131 = icmp slt i64 %129, %130
  br i1 %131, label %132, label %159

132:                                              ; preds = %114
  %133 = load i64, ptr %14, align 8, !tbaa !22
  %134 = load ptr, ptr %17, align 8, !tbaa !8
  %135 = getelementptr inbounds %struct.Node, ptr %134, i32 0, i32 3
  %136 = load i32, ptr %135, align 4, !tbaa !24
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %137) #9
  %139 = load i64, ptr %138, align 8, !tbaa !22
  %140 = add nsw i64 %139, %133
  store i64 %140, ptr %138, align 8, !tbaa !22
  %141 = load i64, ptr %14, align 8, !tbaa !22
  %142 = load ptr, ptr %17, align 8, !tbaa !8
  %143 = getelementptr inbounds %struct.Node, ptr %142, i32 0, i32 3
  %144 = load i32, ptr %143, align 4, !tbaa !24
  %145 = load i32, ptr %7, align 4, !tbaa !11
  %146 = sdiv i32 %144, %145
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %147) #9
  %149 = load i64, ptr %148, align 8, !tbaa !22
  %150 = add nsw i64 %149, %141
  store i64 %150, ptr %148, align 8, !tbaa !22
  br label %159

151:                                              ; preds = %105, %103, %101, %99
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %15, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %16, align 4
  br label %292

155:                                              ; preds = %107
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %15, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %292

159:                                              ; preds = %132, %114
  br label %288

160:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %161 = load ptr, ptr %17, align 8, !tbaa !8
  %162 = getelementptr inbounds %struct.Node, ptr %161, i32 0, i32 4
  %163 = load i32, ptr %162, align 8, !tbaa !25
  store i32 %163, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %164 = load ptr, ptr %17, align 8, !tbaa !8
  %165 = getelementptr inbounds %struct.Node, ptr %164, i32 0, i32 5
  %166 = load i32, ptr %165, align 4, !tbaa !26
  store i32 %166, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  store i64 0, ptr %20, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %167 = load i32, ptr %19, align 4, !tbaa !11
  %168 = load i32, ptr %18, align 4, !tbaa !11
  %169 = sub nsw i32 %167, %168
  %170 = add nsw i32 %169, 1
  %171 = sext i32 %170 to i64
  store i64 %171, ptr %21, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %172 = load i32, ptr %18, align 4, !tbaa !11
  store i32 %172, ptr %22, align 4, !tbaa !11
  br label %173

173:                                              ; preds = %230, %160
  %174 = load i32, ptr %22, align 4, !tbaa !11
  %175 = load i32, ptr %19, align 4, !tbaa !11
  %176 = icmp sle i32 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %231

178:                                              ; preds = %173
  %179 = load i32, ptr %22, align 4, !tbaa !11
  %180 = load i32, ptr %7, align 4, !tbaa !11
  %181 = srem i32 %179, %180
  %182 = icmp eq i32 %181, 0
  br i1 %182, label %183, label %213

183:                                              ; preds = %178
  %184 = load i32, ptr %22, align 4, !tbaa !11
  %185 = load i32, ptr %7, align 4, !tbaa !11
  %186 = add nsw i32 %184, %185
  %187 = sub nsw i32 %186, 1
  %188 = load i32, ptr %19, align 4, !tbaa !11
  %189 = icmp sle i32 %187, %188
  br i1 %189, label %190, label %213

190:                                              ; preds = %183
  %191 = load i32, ptr %22, align 4, !tbaa !11
  %192 = load i32, ptr %7, align 4, !tbaa !11
  %193 = sdiv i32 %191, %192
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %194) #9
  %196 = load i64, ptr %195, align 8, !tbaa !22
  %197 = load i64, ptr %20, align 8, !tbaa !22
  %198 = add nsw i64 %197, %196
  store i64 %198, ptr %20, align 8, !tbaa !22
  %199 = load i32, ptr %22, align 4, !tbaa !11
  %200 = load i32, ptr %7, align 4, !tbaa !11
  %201 = sdiv i32 %199, %200
  %202 = sext i32 %201 to i64
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %202) #9
  %204 = load i64, ptr %203, align 8, !tbaa !22
  %205 = load i32, ptr %7, align 4, !tbaa !11
  %206 = sext i32 %205 to i64
  %207 = mul nsw i64 %204, %206
  %208 = load i64, ptr %20, align 8, !tbaa !22
  %209 = add nsw i64 %208, %207
  store i64 %209, ptr %20, align 8, !tbaa !22
  %210 = load i32, ptr %7, align 4, !tbaa !11
  %211 = load i32, ptr %22, align 4, !tbaa !11
  %212 = add nsw i32 %211, %210
  store i32 %212, ptr %22, align 4, !tbaa !11
  br label %230

213:                                              ; preds = %183, %178
  %214 = load i32, ptr %22, align 4, !tbaa !11
  %215 = sext i32 %214 to i64
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %215) #9
  %217 = load i64, ptr %216, align 8, !tbaa !22
  %218 = load i64, ptr %20, align 8, !tbaa !22
  %219 = add nsw i64 %218, %217
  store i64 %219, ptr %20, align 8, !tbaa !22
  %220 = load i32, ptr %22, align 4, !tbaa !11
  %221 = load i32, ptr %7, align 4, !tbaa !11
  %222 = sdiv i32 %220, %221
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %223) #9
  %225 = load i64, ptr %224, align 8, !tbaa !22
  %226 = load i64, ptr %20, align 8, !tbaa !22
  %227 = add nsw i64 %226, %225
  store i64 %227, ptr %20, align 8, !tbaa !22
  %228 = load i32, ptr %22, align 4, !tbaa !11
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %22, align 4, !tbaa !11
  br label %230

230:                                              ; preds = %213, %190
  br label %173, !llvm.loop !27

231:                                              ; preds = %177
  %232 = load i64, ptr %20, align 8, !tbaa !22
  %233 = load i64, ptr %13, align 8, !tbaa !22
  %234 = load i64, ptr %21, align 8, !tbaa !22
  %235 = mul nsw i64 %233, %234
  %236 = icmp slt i64 %232, %235
  br i1 %236, label %237, label %287

237:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %238 = load i32, ptr %18, align 4, !tbaa !11
  store i32 %238, ptr %23, align 4, !tbaa !11
  br label %239

239:                                              ; preds = %285, %237
  %240 = load i32, ptr %23, align 4, !tbaa !11
  %241 = load i32, ptr %19, align 4, !tbaa !11
  %242 = icmp sle i32 %240, %241
  br i1 %242, label %244, label %243

243:                                              ; preds = %239
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %286

244:                                              ; preds = %239
  %245 = load i32, ptr %23, align 4, !tbaa !11
  %246 = load i32, ptr %7, align 4, !tbaa !11
  %247 = srem i32 %245, %246
  %248 = icmp eq i32 %247, 0
  br i1 %248, label %249, label %268

249:                                              ; preds = %244
  %250 = load i32, ptr %23, align 4, !tbaa !11
  %251 = load i32, ptr %7, align 4, !tbaa !11
  %252 = add nsw i32 %250, %251
  %253 = sub nsw i32 %252, 1
  %254 = load i32, ptr %19, align 4, !tbaa !11
  %255 = icmp sle i32 %253, %254
  br i1 %255, label %256, label %268

256:                                              ; preds = %249
  %257 = load i64, ptr %14, align 8, !tbaa !22
  %258 = load i32, ptr %23, align 4, !tbaa !11
  %259 = load i32, ptr %7, align 4, !tbaa !11
  %260 = sdiv i32 %258, %259
  %261 = sext i32 %260 to i64
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %261) #9
  %263 = load i64, ptr %262, align 8, !tbaa !22
  %264 = add nsw i64 %263, %257
  store i64 %264, ptr %262, align 8, !tbaa !22
  %265 = load i32, ptr %7, align 4, !tbaa !11
  %266 = load i32, ptr %23, align 4, !tbaa !11
  %267 = add nsw i32 %266, %265
  store i32 %267, ptr %23, align 4, !tbaa !11
  br label %285

268:                                              ; preds = %249, %244
  %269 = load i64, ptr %14, align 8, !tbaa !22
  %270 = load i32, ptr %23, align 4, !tbaa !11
  %271 = sext i32 %270 to i64
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %271) #9
  %273 = load i64, ptr %272, align 8, !tbaa !22
  %274 = add nsw i64 %273, %269
  store i64 %274, ptr %272, align 8, !tbaa !22
  %275 = load i64, ptr %14, align 8, !tbaa !22
  %276 = load i32, ptr %23, align 4, !tbaa !11
  %277 = load i32, ptr %7, align 4, !tbaa !11
  %278 = sdiv i32 %276, %277
  %279 = sext i32 %278 to i64
  %280 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %279) #9
  %281 = load i64, ptr %280, align 8, !tbaa !22
  %282 = add nsw i64 %281, %275
  store i64 %282, ptr %280, align 8, !tbaa !22
  %283 = load i32, ptr %23, align 4, !tbaa !11
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %23, align 4, !tbaa !11
  br label %285

285:                                              ; preds = %268, %256
  br label %239, !llvm.loop !28

286:                                              ; preds = %243
  br label %287

287:                                              ; preds = %286, %231
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %288

288:                                              ; preds = %287, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #9
  br label %289

289:                                              ; preds = %288
  %290 = load i32, ptr %9, align 4, !tbaa !11
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %9, align 4, !tbaa !11
  br label %94, !llvm.loop !29

292:                                              ; preds = %155, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %328

293:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %294

294:                                              ; preds = %323, %293
  %295 = load i32, ptr %24, align 4, !tbaa !11
  %296 = load i32, ptr @n, align 4, !tbaa !11
  %297 = icmp slt i32 %295, %296
  br i1 %297, label %299, label %298

298:                                              ; preds = %294
  store i32 15, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %326

299:                                              ; preds = %294
  %300 = load i32, ptr %24, align 4, !tbaa !11
  %301 = sext i32 %300 to i64
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %301) #9
  %303 = load ptr, ptr %302, align 8, !tbaa !8
  %304 = getelementptr inbounds %struct.Node, ptr %303, i32 0, i32 3
  %305 = load i32, ptr %304, align 4, !tbaa !24
  %306 = sext i32 %305 to i64
  %307 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %306) #9
  %308 = load i64, ptr %307, align 8, !tbaa !22
  %309 = load i32, ptr %24, align 4, !tbaa !11
  %310 = sext i32 %309 to i64
  %311 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %310) #9
  %312 = load ptr, ptr %311, align 8, !tbaa !8
  %313 = getelementptr inbounds %struct.Node, ptr %312, i32 0, i32 3
  %314 = load i32, ptr %313, align 4, !tbaa !24
  %315 = load i32, ptr %7, align 4, !tbaa !11
  %316 = sdiv i32 %314, %315
  %317 = sext i32 %316 to i64
  %318 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %317) #9
  %319 = load i64, ptr %318, align 8, !tbaa !22
  %320 = add nsw i64 %308, %319
  %321 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %320)
  %322 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %321, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %323

323:                                              ; preds = %299
  %324 = load i32, ptr %24, align 4, !tbaa !11
  %325 = add nsw i32 %324, 1
  store i32 %325, ptr %24, align 4, !tbaa !11
  br label %294, !llvm.loop !30

326:                                              ; preds = %298
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  %327 = load i32, ptr %1, align 4
  ret i32 %327

328:                                              ; preds = %292
  %329 = load ptr, ptr %15, align 8
  %330 = load i32, ptr %16, align 4
  %331 = insertvalue { ptr, i32 } poison, ptr %329, 0
  %332 = insertvalue { ptr, i32 } %331, i32 %330, 1
  resume { ptr, i32 } %332
}

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #7 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Node8calcSizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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) #3 align 2

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

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

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

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


; 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<Node *, std::allocator<Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<Node *, std::allocator<Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Node *, std::allocator<Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Node *, std::allocator<Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@nodes = external dso_local global %"class.std::vector", align 8
@zp = external dso_local global %"class.std::vector.0", align 8
@delta = external dso_local global %"class.std::vector.0", align 8
@add = external dso_local global %"class.std::vector.0", align 8
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@s0 = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  %16 = tail call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #10
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %16, i8 0, i64 48, i1 false)
  tail call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #9
  store ptr %16, ptr %1, align 8, !tbaa !8
  call void @_ZNSt6vectorIP4NodeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @nodes, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) @q)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) @s0)
  %20 = load i32, ptr @s0, align 4, !tbaa !11
  %21 = sext i32 %20 to i64
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef 0) #9
  %23 = load ptr, ptr %22, align 8, !tbaa !8
  store i64 %21, ptr %23, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  store i32 1, ptr %2, align 4, !tbaa !11
  %24 = load i32, ptr @n, align 4, !tbaa !11
  %25 = icmp sgt i32 %24, 1
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef 0) #9
  %27 = load ptr, ptr %26, align 8, !tbaa !8
  %28 = call noundef i32 @_ZN4Node8calcSizeEv(ptr noundef nonnull align 8 dereferenceable(48) %27)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef 0) #9
  %30 = load ptr, ptr %29, align 8, !tbaa !8
  call void @_ZN4Node5buildEi(ptr noundef nonnull align 8 dereferenceable(48) %30, i32 noundef 0)
  %31 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @zp) #9
  call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %31)
  %32 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @zp) #9
  call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %32)
  %33 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @zp) #9
  %.not99 = icmp eq i64 %33, 0
  br i1 %.not99, label %.preheader80, label %.lr.ph83

.lr.ph:                                           ; preds = %0, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %34 = 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)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %36 = load i32, ptr %3, align 4, !tbaa !11
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %37) #9
  %39 = load ptr, ptr %38, align 8, !tbaa !8
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %41 = call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %41, i8 0, i64 48, i1 false)
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %41) #9
  store ptr %41, ptr %5, align 8, !tbaa !8
  call void @_ZNSt6vectorIP4NodeSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @nodes, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  %42 = load i32, ptr %4, align 4, !tbaa !11
  %43 = sext i32 %42 to i64
  %44 = load i32, ptr %2, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %45) #9
  %47 = load ptr, ptr %46, align 8, !tbaa !8
  store i64 %43, ptr %47, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  %48 = load i32, ptr %2, align 4, !tbaa !11
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %2, align 4, !tbaa !11
  %50 = load i32, ptr @n, align 4, !tbaa !11
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %.lr.ph, label %._crit_edge, !llvm.loop !20

.preheader80:                                     ; preds = %.lr.ph83, %._crit_edge
  %52 = load i32, ptr @q, align 4, !tbaa !11
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph94, label %.preheader

.lr.ph83:                                         ; preds = %._crit_edge, %.lr.ph83
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph83 ], [ 0, %._crit_edge ]
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %indvars.iv) #9
  %55 = load i64, ptr %54, align 8, !tbaa !22
  %56 = trunc nuw nsw i64 %indvars.iv to i32
  %57 = udiv i32 %56, 228
  %58 = zext nneg i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %58) #9
  %60 = load i64, ptr %59, align 8, !tbaa !22
  %61 = add nsw i64 %60, %55
  store i64 %61, ptr %59, align 8, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %62 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @zp) #9
  %63 = icmp ugt i64 %62, %indvars.iv.next
  br i1 %63, label %.lr.ph83, label %.preheader80, !llvm.loop !23

.preheader:                                       ; preds = %.loopexit, %.preheader80
  %64 = load i32, ptr @n, align 4, !tbaa !11
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph96, label %._crit_edge97

.lr.ph94:                                         ; preds = %.preheader80, %.loopexit
  %.07193 = phi i32 [ %170, %.loopexit ], [ 0, %.preheader80 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %66 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %67 unwind label %107

67:                                               ; preds = %.lr.ph94
  %68 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %69 unwind label %107

69:                                               ; preds = %67
  %70 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %71 unwind label %107

71:                                               ; preds = %69
  %72 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %73 unwind label %107

73:                                               ; preds = %71
  %74 = load i32, ptr %7, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %75) #9
  %77 = load ptr, ptr %76, align 8, !tbaa !8
  %78 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str)
  br i1 %78, label %79, label %109

79:                                               ; preds = %73
  %80 = getelementptr inbounds i8, ptr %77, i64 36
  %81 = load i32, ptr %80, align 4, !tbaa !24
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %82) #9
  %84 = load i64, ptr %83, align 8, !tbaa !22
  %85 = load i32, ptr %80, align 4, !tbaa !24
  %86 = sdiv i32 %85, 228
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %87) #9
  %89 = load i64, ptr %88, align 8, !tbaa !22
  %90 = add nsw i64 %89, %84
  %91 = load i64, ptr %8, align 8, !tbaa !22
  %92 = icmp slt i64 %90, %91
  br i1 %92, label %93, label %.loopexit

93:                                               ; preds = %79
  %94 = load i64, ptr %9, align 8, !tbaa !22
  %95 = load i32, ptr %80, align 4, !tbaa !24
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %96) #9
  %98 = load i64, ptr %97, align 8, !tbaa !22
  %99 = add nsw i64 %98, %94
  store i64 %99, ptr %97, align 8, !tbaa !22
  %100 = load i64, ptr %9, align 8, !tbaa !22
  %101 = load i32, ptr %80, align 4, !tbaa !24
  %102 = sdiv i32 %101, 228
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %103) #9
  %105 = load i64, ptr %104, align 8, !tbaa !22
  %106 = add nsw i64 %105, %100
  store i64 %106, ptr %104, align 8, !tbaa !22
  br label %.loopexit

107:                                              ; preds = %71, %69, %67, %.lr.ph94
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  resume { ptr, i32 } %108

109:                                              ; preds = %73
  %110 = getelementptr inbounds i8, ptr %77, i64 40
  %111 = load i32, ptr %110, align 8, !tbaa !25
  %112 = getelementptr inbounds i8, ptr %77, i64 44
  %113 = load i32, ptr %112, align 4, !tbaa !26
  %reass.sub = sub i32 %113, %111
  %114 = add i32 %reass.sub, 1
  %115 = sext i32 %114 to i64
  %.not84 = icmp sgt i32 %111, %113
  br i1 %.not84, label %.loopexit, label %.lr.ph88

._crit_edge89:                                    ; preds = %144
  %116 = load i64, ptr %8, align 8, !tbaa !22
  %117 = mul nsw i64 %116, %115
  %118 = icmp sge i64 %.170, %117
  %or.cond98 = or i1 %118, %.not84
  br i1 %or.cond98, label %.loopexit, label %.lr.ph92

.lr.ph88:                                         ; preds = %109, %144
  %.06686 = phi i32 [ %.167, %144 ], [ %111, %109 ]
  %.06985 = phi i64 [ %.170, %144 ], [ 0, %109 ]
  %119 = srem i32 %.06686, 228
  %120 = sdiv i32 %.06686, 228
  %121 = icmp ne i32 %119, 0
  %122 = add nsw i32 %.06686, 227
  %.not77 = icmp sgt i32 %122, %113
  %or.cond = select i1 %121, i1 true, i1 %.not77
  br i1 %or.cond, label %134, label %123

123:                                              ; preds = %.lr.ph88
  %124 = add nsw i32 %.06686, 228
  %125 = sdiv i32 %.06686, 228
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %126) #9
  %128 = load i64, ptr %127, align 8, !tbaa !22
  %129 = add nsw i64 %128, %.06985
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %126) #9
  %131 = load i64, ptr %130, align 8, !tbaa !22
  %132 = mul nsw i64 %131, 228
  %133 = add nsw i64 %129, %132
  br label %144

134:                                              ; preds = %.lr.ph88
  %135 = sext i32 %.06686 to i64
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %135) #9
  %137 = load i64, ptr %136, align 8, !tbaa !22
  %138 = add nsw i64 %137, %.06985
  %139 = sext i32 %120 to i64
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %139) #9
  %141 = load i64, ptr %140, align 8, !tbaa !22
  %142 = add nsw i64 %138, %141
  %143 = add nsw i32 %.06686, 1
  br label %144

144:                                              ; preds = %134, %123
  %.170 = phi i64 [ %133, %123 ], [ %142, %134 ]
  %.167 = phi i32 [ %124, %123 ], [ %143, %134 ]
  %.not = icmp sgt i32 %.167, %113
  br i1 %.not, label %._crit_edge89, label %.lr.ph88, !llvm.loop !27

.lr.ph92:                                         ; preds = %._crit_edge89, %169
  %.06591 = phi i32 [ %.1, %169 ], [ %111, %._crit_edge89 ]
  %145 = srem i32 %.06591, 228
  %146 = sdiv i32 %.06591, 228
  %147 = icmp ne i32 %145, 0
  %148 = add nsw i32 %.06591, 227
  %.not76 = icmp sgt i32 %148, %113
  %or.cond78 = select i1 %147, i1 true, i1 %.not76
  br i1 %or.cond78, label %157, label %149

149:                                              ; preds = %.lr.ph92
  %150 = add nsw i32 %.06591, 228
  %151 = load i64, ptr %9, align 8, !tbaa !22
  %152 = sdiv i32 %.06591, 228
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %153) #9
  %155 = load i64, ptr %154, align 8, !tbaa !22
  %156 = add nsw i64 %155, %151
  store i64 %156, ptr %154, align 8, !tbaa !22
  br label %169

157:                                              ; preds = %.lr.ph92
  %158 = load i64, ptr %9, align 8, !tbaa !22
  %159 = sext i32 %.06591 to i64
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %159) #9
  %161 = load i64, ptr %160, align 8, !tbaa !22
  %162 = add nsw i64 %161, %158
  store i64 %162, ptr %160, align 8, !tbaa !22
  %163 = load i64, ptr %9, align 8, !tbaa !22
  %164 = sext i32 %146 to i64
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @add, i64 noundef %164) #9
  %166 = load i64, ptr %165, align 8, !tbaa !22
  %167 = add nsw i64 %166, %163
  store i64 %167, ptr %165, align 8, !tbaa !22
  %168 = add nsw i32 %.06591, 1
  br label %169

169:                                              ; preds = %157, %149
  %.1 = phi i32 [ %150, %149 ], [ %168, %157 ]
  %.not75 = icmp sgt i32 %.1, %113
  br i1 %.not75, label %.loopexit, label %.lr.ph92, !llvm.loop !28

.loopexit:                                        ; preds = %169, %109, %._crit_edge89, %79, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  %170 = add nuw nsw i32 %.07193, 1
  %171 = load i32, ptr @q, align 4, !tbaa !11
  %172 = icmp slt i32 %170, %171
  br i1 %172, label %.lr.ph94, label %.preheader, !llvm.loop !29

._crit_edge97:                                    ; preds = %.lr.ph96, %.preheader
  ret i32 0

.lr.ph96:                                         ; preds = %.preheader, %.lr.ph96
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %.lr.ph96 ], [ 0, %.preheader ]
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %indvars.iv101) #9
  %174 = load ptr, ptr %173, align 8, !tbaa !8
  %175 = getelementptr inbounds i8, ptr %174, i64 36
  %176 = load i32, ptr %175, align 4, !tbaa !24
  %177 = sext i32 %176 to i64
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zp, i64 noundef %177) #9
  %179 = load i64, ptr %178, align 8, !tbaa !22
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4NodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @nodes, i64 noundef %indvars.iv101) #9
  %181 = load ptr, ptr %180, align 8, !tbaa !8
  %182 = getelementptr inbounds i8, ptr %181, i64 36
  %183 = load i32, ptr %182, align 4, !tbaa !24
  %184 = sdiv i32 %183, 228
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %185) #9
  %187 = load i64, ptr %186, align 8, !tbaa !22
  %188 = add nsw i64 %187, %179
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %188)
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %189, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %191 = load i32, ptr @n, align 4, !tbaa !11
  %192 = sext i32 %191 to i64
  %193 = icmp slt i64 %indvars.iv.next102, %192
  br i1 %193, label %.lr.ph96, label %._crit_edge97, !llvm.loop !30
}

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Node8calcSizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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 #3 align 2

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

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

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

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


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