; LLVM IR from pranjalwalia/Competitive-programming :: implementations/segtrees/template/node_based.ll (Z5buildPiiii)

; 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"

%struct.node = type { i32, i32, i32, i32 }

@tree = external dso_local global [40004 x %struct.node], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5buildPiiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %13 = load i32, ptr %6, align 4, !tbaa !9
  %14 = load i32, ptr %7, align 4, !tbaa !9
  %15 = icmp eq i32 %13, %14
  br i1 %15, label %16, label %53

16:                                               ; preds = %4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds i32, ptr %17, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %23
  %25 = getelementptr inbounds %struct.node, ptr %24, i32 0, i32 0
  store i32 %21, ptr %25, align 16, !tbaa !11
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr %26, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %32
  %34 = getelementptr inbounds %struct.node, ptr %33, i32 0, i32 1
  store i32 %30, ptr %34, align 4, !tbaa !13
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %35, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %41
  %43 = getelementptr inbounds %struct.node, ptr %42, i32 0, i32 2
  store i32 %39, ptr %43, align 8, !tbaa !14
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %44, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %50
  %52 = getelementptr inbounds %struct.node, ptr %51, i32 0, i32 3
  store i32 %48, ptr %52, align 4, !tbaa !15
  br label %188

53:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = add nsw i32 %54, %55
  %57 = sdiv i32 %56, 2
  store i32 %57, ptr %9, align 4, !tbaa !9
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = mul nsw i32 2, %61
  %63 = add nsw i32 %62, 1
  call void @_Z5buildPiiii(ptr noundef %58, i32 noundef %59, i32 noundef %60, i32 noundef %63)
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = mul nsw i32 2, %68
  %70 = add nsw i32 %69, 2
  call void @_Z5buildPiiii(ptr noundef %64, i32 noundef %66, i32 noundef %67, i32 noundef %70)
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = mul nsw i32 2, %71
  %73 = add nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %74
  %76 = getelementptr inbounds %struct.node, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 16, !tbaa !11
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = mul nsw i32 2, %78
  %80 = add nsw i32 %79, 2
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %81
  %83 = getelementptr inbounds %struct.node, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 16, !tbaa !11
  %85 = add nsw i32 %77, %84
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.node, ptr %88, i32 0, i32 0
  store i32 %85, ptr %89, align 16, !tbaa !11
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = mul nsw i32 2, %90
  %92 = add nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %93
  %95 = getelementptr inbounds %struct.node, ptr %94, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %96 = load i32, ptr %8, align 4, !tbaa !9
  %97 = mul nsw i32 2, %96
  %98 = add nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.node, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 16, !tbaa !11
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = mul nsw i32 2, %103
  %105 = add nsw i32 %104, 2
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %106
  %108 = getelementptr inbounds %struct.node, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !13
  %110 = add nsw i32 %102, %109
  store i32 %110, ptr %10, align 4, !tbaa !9
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %95, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.node, ptr %115, i32 0, i32 1
  store i32 %112, ptr %116, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %117 = load i32, ptr %8, align 4, !tbaa !9
  %118 = mul nsw i32 2, %117
  %119 = add nsw i32 %118, 2
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %120
  %122 = getelementptr inbounds %struct.node, ptr %121, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %123 = load i32, ptr %8, align 4, !tbaa !9
  %124 = mul nsw i32 2, %123
  %125 = add nsw i32 %124, 2
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %126
  %128 = getelementptr inbounds %struct.node, ptr %127, i32 0, i32 0
  %129 = load i32, ptr %128, align 16, !tbaa !11
  %130 = load i32, ptr %8, align 4, !tbaa !9
  %131 = mul nsw i32 2, %130
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %133
  %135 = getelementptr inbounds %struct.node, ptr %134, i32 0, i32 2
  %136 = load i32, ptr %135, align 8, !tbaa !14
  %137 = add nsw i32 %129, %136
  store i32 %137, ptr %11, align 4, !tbaa !9
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %122, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %139 = load i32, ptr %138, align 4, !tbaa !9
  %140 = load i32, ptr %8, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %141
  %143 = getelementptr inbounds %struct.node, ptr %142, i32 0, i32 2
  store i32 %139, ptr %143, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  %144 = load i32, ptr %8, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %145
  %147 = getelementptr inbounds %struct.node, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %8, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %149
  %151 = getelementptr inbounds %struct.node, ptr %150, i32 0, i32 2
  %152 = load i32, ptr %8, align 4, !tbaa !9
  %153 = mul nsw i32 2, %152
  %154 = add nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %155
  %157 = getelementptr inbounds %struct.node, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %8, align 4, !tbaa !9
  %159 = mul nsw i32 2, %158
  %160 = add nsw i32 %159, 2
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %161
  %163 = getelementptr inbounds %struct.node, ptr %162, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %164 = load i32, ptr %8, align 4, !tbaa !9
  %165 = mul nsw i32 2, %164
  %166 = add nsw i32 %165, 1
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %167
  %169 = getelementptr inbounds %struct.node, ptr %168, i32 0, i32 2
  %170 = load i32, ptr %169, align 8, !tbaa !14
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = mul nsw i32 2, %171
  %173 = add nsw i32 %172, 2
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %174
  %176 = getelementptr inbounds %struct.node, ptr %175, i32 0, i32 1
  %177 = load i32, ptr %176, align 4, !tbaa !13
  %178 = add nsw i32 %170, %177
  store i32 %178, ptr %12, align 4, !tbaa !9
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %163, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %157, ptr noundef nonnull align 4 dereferenceable(4) %179)
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %151, ptr noundef nonnull align 4 dereferenceable(4) %180)
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %147, ptr noundef nonnull align 4 dereferenceable(4) %181)
  %183 = load i32, ptr %182, align 4, !tbaa !9
  %184 = load i32, ptr %8, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %185
  %187 = getelementptr inbounds %struct.node, ptr %186, i32 0, i32 3
  store i32 %183, ptr %187, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %188

188:                                              ; preds = %53, %16
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 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 = { 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 #3 = { nounwind }

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

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


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

%struct.node = type { i32, i32, i32, i32 }

@tree = external dso_local global [40004 x %struct.node], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z5buildPiiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = icmp eq i32 %1, %2
  br i1 %8, label %common.ret, label %18

common.ret:                                       ; preds = %4
  %9 = sext i32 %1 to i64
  %10 = getelementptr inbounds i32, ptr %0, i64 %9
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = sext i32 %3 to i64
  %13 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %12
  store i32 %11, ptr %13, align 16, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %13, i64 4
  store i32 %11, ptr %14, align 4, !tbaa !11
  %15 = load i32, ptr %10, align 4, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %13, i64 8
  store i32 %15, ptr %16, align 8, !tbaa !12
  %17 = getelementptr inbounds i8, ptr %13, i64 12
  store i32 %15, ptr %17, align 4, !tbaa !13
  br label %common.ret42

common.ret42:                                     ; preds = %18, %common.ret
  ret void

18:                                               ; preds = %4
  %19 = add nsw i32 %2, %1
  %20 = sdiv i32 %19, 2
  %21 = shl nsw i32 %3, 1
  %22 = or disjoint i32 %21, 1
  tail call void @_Z5buildPiiii(ptr noundef %0, i32 noundef %1, i32 noundef %20, i32 noundef %22)
  %23 = add nsw i32 %20, 1
  %24 = add nsw i32 %21, 2
  tail call void @_Z5buildPiiii(ptr noundef %0, i32 noundef %23, i32 noundef %2, i32 noundef %24)
  %25 = sext i32 %22 to i64
  %26 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %25
  %27 = load i32, ptr %26, align 16, !tbaa !9
  %28 = sext i32 %24 to i64
  %29 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %28
  %30 = load i32, ptr %29, align 16, !tbaa !9
  %31 = add nsw i32 %30, %27
  %32 = sext i32 %3 to i64
  %33 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %32
  store i32 %31, ptr %33, align 16, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %26, i64 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %35 = load i32, ptr %26, align 16, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %29, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !11
  %38 = add nsw i32 %37, %35
  store i32 %38, ptr %5, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %33, i64 4
  store i32 %40, ptr %41, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  %42 = getelementptr inbounds i8, ptr %29, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %43 = load i32, ptr %29, align 16, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %26, i64 8
  %45 = load i32, ptr %44, align 8, !tbaa !12
  %46 = add nsw i32 %45, %43
  store i32 %46, ptr %6, align 4, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %33, i64 8
  store i32 %48, ptr %49, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  %50 = getelementptr inbounds i8, ptr %26, i64 12
  %51 = getelementptr inbounds i8, ptr %29, i64 12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %52 = load i32, ptr %44, align 8, !tbaa !12
  %53 = load i32, ptr %36, align 4, !tbaa !11
  %54 = add nsw i32 %53, %52
  store i32 %54, ptr %7, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %50, ptr noundef nonnull align 4 dereferenceable(4) %55)
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %49, ptr noundef nonnull align 4 dereferenceable(4) %56)
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(4) %57)
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %33, i64 12
  store i32 %59, ptr %60, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  br label %common.ret42
}

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

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

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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, !6, i64 0}
!10 = !{!"_ZTS4node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 12}


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