; LLVM IR from abeaumont/competitive-programming :: cses/1735.ll (Z4pushiii)

; 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 }
%struct.node = type { i64, i64, i64 }

@tree = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z4pushiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  %8 = load i32, ptr %4, align 4, !tbaa !5
  %9 = load i32, ptr %5, align 4, !tbaa !5
  %10 = add nsw i32 %8, %9
  %11 = sdiv i32 %10, 2
  store i32 %11, ptr %7, align 4, !tbaa !5
  %12 = load i32, ptr %6, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %13) #2
  %15 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 2
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = icmp ne i64 %16, 1000000000000000000
  br i1 %17, label %18, label %86

18:                                               ; preds = %3
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %20) #2
  %22 = getelementptr inbounds %struct.node, ptr %21, i32 0, i32 2
  %23 = load i64, ptr %22, align 8, !tbaa !9
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = mul nsw i32 2, %24
  %26 = sext i32 %25 to i64
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %26) #2
  %28 = getelementptr inbounds %struct.node, ptr %27, i32 0, i32 2
  store i64 %23, ptr %28, align 8, !tbaa !9
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = mul nsw i32 2, %29
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %31) #2
  %33 = getelementptr inbounds %struct.node, ptr %32, i32 0, i32 1
  store i64 0, ptr %33, align 8, !tbaa !12
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = mul nsw i32 2, %34
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %36) #2
  %38 = getelementptr inbounds %struct.node, ptr %37, i32 0, i32 2
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sub nsw i32 %40, %41
  %43 = add nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = mul nsw i64 %39, %44
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = mul nsw i32 2, %46
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %48) #2
  %50 = getelementptr inbounds %struct.node, ptr %49, i32 0, i32 0
  store i64 %45, ptr %50, align 8, !tbaa !13
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %52) #2
  %54 = getelementptr inbounds %struct.node, ptr %53, i32 0, i32 2
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = mul nsw i32 2, %56
  %58 = add nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %59) #2
  %61 = getelementptr inbounds %struct.node, ptr %60, i32 0, i32 2
  store i64 %55, ptr %61, align 8, !tbaa !9
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = mul nsw i32 2, %62
  %64 = add nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %65) #2
  %67 = getelementptr inbounds %struct.node, ptr %66, i32 0, i32 1
  store i64 0, ptr %67, align 8, !tbaa !12
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = mul nsw i32 2, %68
  %70 = add nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %71) #2
  %73 = getelementptr inbounds %struct.node, ptr %72, i32 0, i32 2
  %74 = load i64, ptr %73, align 8, !tbaa !9
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sub nsw i32 %75, %76
  %78 = sext i32 %77 to i64
  %79 = mul nsw i64 %74, %78
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = mul nsw i32 2, %80
  %82 = add nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %83) #2
  %85 = getelementptr inbounds %struct.node, ptr %84, i32 0, i32 0
  store i64 %79, ptr %85, align 8, !tbaa !13
  br label %229

86:                                               ; preds = %3
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = mul nsw i32 2, %87
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %89) #2
  %91 = getelementptr inbounds %struct.node, ptr %90, i32 0, i32 2
  %92 = load i64, ptr %91, align 8, !tbaa !9
  %93 = icmp ne i64 %92, 1000000000000000000
  br i1 %93, label %94, label %124

94:                                               ; preds = %86
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %96) #2
  %98 = getelementptr inbounds %struct.node, ptr %97, i32 0, i32 1
  %99 = load i64, ptr %98, align 8, !tbaa !12
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = mul nsw i32 2, %100
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %102) #2
  %104 = getelementptr inbounds %struct.node, ptr %103, i32 0, i32 2
  %105 = load i64, ptr %104, align 8, !tbaa !9
  %106 = add nsw i64 %105, %99
  store i64 %106, ptr %104, align 8, !tbaa !9
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = mul nsw i32 2, %107
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %109) #2
  %111 = getelementptr inbounds %struct.node, ptr %110, i32 0, i32 2
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = sub nsw i32 %113, %114
  %116 = add nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = mul nsw i64 %112, %117
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = mul nsw i32 2, %119
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %121) #2
  %123 = getelementptr inbounds %struct.node, ptr %122, i32 0, i32 0
  store i64 %118, ptr %123, align 8, !tbaa !13
  br label %155

124:                                              ; preds = %86
  %125 = load i32, ptr %6, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %126) #2
  %128 = getelementptr inbounds %struct.node, ptr %127, i32 0, i32 1
  %129 = load i64, ptr %128, align 8, !tbaa !12
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = mul nsw i32 2, %130
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %132) #2
  %134 = getelementptr inbounds %struct.node, ptr %133, i32 0, i32 1
  %135 = load i64, ptr %134, align 8, !tbaa !12
  %136 = add nsw i64 %135, %129
  store i64 %136, ptr %134, align 8, !tbaa !12
  %137 = load i32, ptr %6, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %138) #2
  %140 = getelementptr inbounds %struct.node, ptr %139, i32 0, i32 1
  %141 = load i64, ptr %140, align 8, !tbaa !12
  %142 = load i32, ptr %7, align 4, !tbaa !5
  %143 = load i32, ptr %4, align 4, !tbaa !5
  %144 = sub nsw i32 %142, %143
  %145 = add nsw i32 %144, 1
  %146 = sext i32 %145 to i64
  %147 = mul nsw i64 %141, %146
  %148 = load i32, ptr %6, align 4, !tbaa !5
  %149 = mul nsw i32 2, %148
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %150) #2
  %152 = getelementptr inbounds %struct.node, ptr %151, i32 0, i32 0
  %153 = load i64, ptr %152, align 8, !tbaa !13
  %154 = add nsw i64 %153, %147
  store i64 %154, ptr %152, align 8, !tbaa !13
  br label %155

155:                                              ; preds = %124, %94
  %156 = load i32, ptr %6, align 4, !tbaa !5
  %157 = mul nsw i32 2, %156
  %158 = add nsw i32 %157, 1
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %159) #2
  %161 = getelementptr inbounds %struct.node, ptr %160, i32 0, i32 2
  %162 = load i64, ptr %161, align 8, !tbaa !9
  %163 = icmp ne i64 %162, 1000000000000000000
  br i1 %163, label %164, label %196

164:                                              ; preds = %155
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %166) #2
  %168 = getelementptr inbounds %struct.node, ptr %167, i32 0, i32 1
  %169 = load i64, ptr %168, align 8, !tbaa !12
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = mul nsw i32 2, %170
  %172 = add nsw i32 %171, 1
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %173) #2
  %175 = getelementptr inbounds %struct.node, ptr %174, i32 0, i32 2
  %176 = load i64, ptr %175, align 8, !tbaa !9
  %177 = add nsw i64 %176, %169
  store i64 %177, ptr %175, align 8, !tbaa !9
  %178 = load i32, ptr %6, align 4, !tbaa !5
  %179 = mul nsw i32 2, %178
  %180 = add nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %181) #2
  %183 = getelementptr inbounds %struct.node, ptr %182, i32 0, i32 2
  %184 = load i64, ptr %183, align 8, !tbaa !9
  %185 = load i32, ptr %5, align 4, !tbaa !5
  %186 = load i32, ptr %7, align 4, !tbaa !5
  %187 = sub nsw i32 %185, %186
  %188 = sext i32 %187 to i64
  %189 = mul nsw i64 %184, %188
  %190 = load i32, ptr %6, align 4, !tbaa !5
  %191 = mul nsw i32 2, %190
  %192 = add nsw i32 %191, 1
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %193) #2
  %195 = getelementptr inbounds %struct.node, ptr %194, i32 0, i32 0
  store i64 %189, ptr %195, align 8, !tbaa !13
  br label %228

196:                                              ; preds = %155
  %197 = load i32, ptr %6, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %198) #2
  %200 = getelementptr inbounds %struct.node, ptr %199, i32 0, i32 1
  %201 = load i64, ptr %200, align 8, !tbaa !12
  %202 = load i32, ptr %6, align 4, !tbaa !5
  %203 = mul nsw i32 2, %202
  %204 = add nsw i32 %203, 1
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %205) #2
  %207 = getelementptr inbounds %struct.node, ptr %206, i32 0, i32 1
  %208 = load i64, ptr %207, align 8, !tbaa !12
  %209 = add nsw i64 %208, %201
  store i64 %209, ptr %207, align 8, !tbaa !12
  %210 = load i32, ptr %6, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %211) #2
  %213 = getelementptr inbounds %struct.node, ptr %212, i32 0, i32 1
  %214 = load i64, ptr %213, align 8, !tbaa !12
  %215 = load i32, ptr %5, align 4, !tbaa !5
  %216 = load i32, ptr %7, align 4, !tbaa !5
  %217 = sub nsw i32 %215, %216
  %218 = sext i32 %217 to i64
  %219 = mul nsw i64 %214, %218
  %220 = load i32, ptr %6, align 4, !tbaa !5
  %221 = mul nsw i32 2, %220
  %222 = add nsw i32 %221, 1
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %223) #2
  %225 = getelementptr inbounds %struct.node, ptr %224, i32 0, i32 0
  %226 = load i64, ptr %225, align 8, !tbaa !13
  %227 = add nsw i64 %226, %219
  store i64 %227, ptr %225, align 8, !tbaa !13
  br label %228

228:                                              ; preds = %196, %164
  br label %229

229:                                              ; preds = %228, %18
  %230 = load i32, ptr %6, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %231) #2
  %233 = getelementptr inbounds %struct.node, ptr %232, i32 0, i32 2
  store i64 1000000000000000000, ptr %233, align 8, !tbaa !9
  %234 = load i32, ptr %6, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %235) #2
  %237 = getelementptr inbounds %struct.node, ptr %236, i32 0, i32 1
  store i64 0, ptr %237, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  ret void
}

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<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 }

@tree = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z4pushiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = add nsw i32 %1, %0
  %5 = sdiv i32 %4, 2
  %6 = sext i32 %2 to i64
  %7 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i64 %9, 1000000000000000000
  br i1 %.not, label %43, label %10

10:                                               ; preds = %3
  %11 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = shl nsw i32 %2, 1
  %15 = sext i32 %14 to i64
  %16 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %15) #1
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  store i64 %13, ptr %17, align 8, !tbaa !5
  %18 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %15) #1
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  store i64 0, ptr %19, align 8, !tbaa !10
  %20 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %15) #1
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %reass.sub = sub i32 %5, %0
  %23 = add i32 %reass.sub, 1
  %24 = sext i32 %23 to i64
  %25 = mul nsw i64 %22, %24
  %26 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %15) #1
  store i64 %25, ptr %26, align 8, !tbaa !11
  %27 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = or disjoint i32 %14, 1
  %31 = sext i32 %30 to i64
  %32 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %31) #1
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  store i64 %29, ptr %33, align 8, !tbaa !5
  %34 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %31) #1
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  store i64 0, ptr %35, align 8, !tbaa !10
  %36 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %31) #1
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = sub nsw i32 %1, %5
  %40 = sext i32 %39 to i64
  %41 = mul nsw i64 %38, %40
  %42 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %31) #1
  store i64 %41, ptr %42, align 8, !tbaa !11
  br label %107

43:                                               ; preds = %3
  %44 = shl nsw i32 %2, 1
  %45 = sext i32 %44 to i64
  %46 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %45) #1
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %.not45 = icmp eq i64 %48, 1000000000000000000
  %49 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load i64, ptr %50, align 8, !tbaa !10
  %52 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %45) #1
  %reass.sub48 = sub i32 %5, %0
  %53 = add i32 %reass.sub48, 1
  %54 = sext i32 %53 to i64
  br i1 %.not45, label %64, label %55

55:                                               ; preds = %43
  %56 = getelementptr inbounds i8, ptr %52, i64 16
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = add nsw i64 %57, %51
  store i64 %58, ptr %56, align 8, !tbaa !5
  %59 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %45) #1
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = mul nsw i64 %61, %54
  %63 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %45) #1
  store i64 %62, ptr %63, align 8, !tbaa !11
  br label %75

64:                                               ; preds = %43
  %65 = getelementptr inbounds i8, ptr %52, i64 8
  %66 = load i64, ptr %65, align 8, !tbaa !10
  %67 = add nsw i64 %66, %51
  store i64 %67, ptr %65, align 8, !tbaa !10
  %68 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  %70 = load i64, ptr %69, align 8, !tbaa !10
  %71 = mul nsw i64 %70, %54
  %72 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %45) #1
  %73 = load i64, ptr %72, align 8, !tbaa !11
  %74 = add nsw i64 %73, %71
  store i64 %74, ptr %72, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %64, %55
  %76 = or disjoint i32 %44, 1
  %77 = sext i32 %76 to i64
  %78 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %77) #1
  %79 = getelementptr inbounds i8, ptr %78, i64 16
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %.not46 = icmp eq i64 %80, 1000000000000000000
  %81 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = load i64, ptr %82, align 8, !tbaa !10
  %84 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %77) #1
  %85 = sub nsw i32 %1, %5
  %86 = sext i32 %85 to i64
  br i1 %.not46, label %96, label %87

87:                                               ; preds = %75
  %88 = getelementptr inbounds i8, ptr %84, i64 16
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = add nsw i64 %89, %83
  store i64 %90, ptr %88, align 8, !tbaa !5
  %91 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %77) #1
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  %93 = load i64, ptr %92, align 8, !tbaa !5
  %94 = mul nsw i64 %93, %86
  %95 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %77) #1
  store i64 %94, ptr %95, align 8, !tbaa !11
  br label %107

96:                                               ; preds = %75
  %97 = getelementptr inbounds i8, ptr %84, i64 8
  %98 = load i64, ptr %97, align 8, !tbaa !10
  %99 = add nsw i64 %98, %83
  store i64 %99, ptr %97, align 8, !tbaa !10
  %100 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  %102 = load i64, ptr %101, align 8, !tbaa !10
  %103 = mul nsw i64 %102, %86
  %104 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %77) #1
  %105 = load i64, ptr %104, align 8, !tbaa !11
  %106 = add nsw i64 %105, %103
  store i64 %106, ptr %104, align 8, !tbaa !11
  br label %107

107:                                              ; preds = %87, %96, %10
  %108 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %109 = getelementptr inbounds i8, ptr %108, i64 16
  store i64 1000000000000000000, ptr %109, align 8, !tbaa !5
  %110 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tree, i64 noundef %6) #1
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  store i64 0, ptr %111, align 8, !tbaa !10
  ret void
}

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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, !7, i64 16}
!6 = !{!"_ZTS4node", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!6, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass