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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_Z5queryPiiiiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca %struct.node, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.node, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.node, align 4
  %18 = alloca %struct.node, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %22 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 3
  store i32 -2147483648, ptr %22, align 4, !tbaa !11
  %23 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 2
  store i32 -2147483648, ptr %23, align 4, !tbaa !13
  %24 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 1
  store i32 -2147483648, ptr %24, align 4, !tbaa !14
  %25 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 0
  store i32 -2147483648, ptr %25, align 4, !tbaa !15
  %26 = load i32, ptr %13, align 4, !tbaa !9
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %33, label %29

29:                                               ; preds = %6
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = load i32, ptr %12, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %29, %6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %14, i64 16, i1 false), !tbaa.struct !16
  store i32 1, ptr %15, align 4
  br label %155

34:                                               ; preds = %29
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %38, label %46

38:                                               ; preds = %34
  %39 = load i32, ptr %11, align 4, !tbaa !9
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %42, label %46

42:                                               ; preds = %38
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %44
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 16 %45, i64 16, i1 false), !tbaa.struct !16
  store i32 1, ptr %15, align 4
  br label %155

46:                                               ; preds = %38, %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = add nsw i32 %47, %48
  %50 = sdiv i32 %49, 2
  store i32 %50, ptr %16, align 4, !tbaa !9
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = load i32, ptr %16, align 4, !tbaa !9
  %53 = icmp sgt i32 %51, %52
  br i1 %53, label %54, label %69

54:                                               ; preds = %46
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = mul nsw i32 2, %56
  %58 = add nsw i32 %57, 2
  %59 = load i32, ptr %16, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %55, i32 noundef %58, i32 noundef %60, i32 noundef %61, i32 noundef %62, i32 noundef %63)
  %65 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %66 = extractvalue { i64, i64 } %64, 0
  store i64 %66, ptr %65, align 4
  %67 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %68 = extractvalue { i64, i64 } %64, 1
  store i64 %68, ptr %67, align 4
  store i32 1, ptr %15, align 4
  br label %154

69:                                               ; preds = %46
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = load i32, ptr %16, align 4, !tbaa !9
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %73, label %87

73:                                               ; preds = %69
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = mul nsw i32 2, %75
  %77 = add nsw i32 %76, 1
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = load i32, ptr %16, align 4, !tbaa !9
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %74, i32 noundef %77, i32 noundef %78, i32 noundef %79, i32 noundef %80, i32 noundef %81)
  %83 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %84 = extractvalue { i64, i64 } %82, 0
  store i64 %84, ptr %83, align 4
  %85 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %86 = extractvalue { i64, i64 } %82, 1
  store i64 %86, ptr %85, align 4
  store i32 1, ptr %15, align 4
  br label %154

87:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = mul nsw i32 2, %89
  %91 = add nsw i32 %90, 1
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = load i32, ptr %16, align 4, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %88, i32 noundef %91, i32 noundef %92, i32 noundef %93, i32 noundef %94, i32 noundef %95)
  %97 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %98 = extractvalue { i64, i64 } %96, 0
  store i64 %98, ptr %97, align 4
  %99 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %100 = extractvalue { i64, i64 } %96, 1
  store i64 %100, ptr %99, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = load i32, ptr %9, align 4, !tbaa !9
  %103 = mul nsw i32 2, %102
  %104 = add nsw i32 %103, 2
  %105 = load i32, ptr %16, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %101, i32 noundef %104, i32 noundef %106, i32 noundef %107, i32 noundef %108, i32 noundef %109)
  %111 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %112 = extractvalue { i64, i64 } %110, 0
  store i64 %112, ptr %111, align 4
  %113 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %114 = extractvalue { i64, i64 } %110, 1
  store i64 %114, ptr %113, align 4
  %115 = getelementptr inbounds %struct.node, ptr %17, i32 0, i32 0
  %116 = load i32, ptr %115, align 4, !tbaa !15
  %117 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 0
  %118 = load i32, ptr %117, align 4, !tbaa !15
  %119 = add nsw i32 %116, %118
  %120 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 0
  store i32 %119, ptr %120, align 4, !tbaa !15
  %121 = getelementptr inbounds %struct.node, ptr %17, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %122 = getelementptr inbounds %struct.node, ptr %17, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !15
  %124 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !14
  %126 = add nsw i32 %123, %125
  store i32 %126, ptr %19, align 4, !tbaa !9
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %121, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %128 = load i32, ptr %127, align 4, !tbaa !9
  %129 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 1
  store i32 %128, ptr %129, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  %130 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %131 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !15
  %133 = getelementptr inbounds %struct.node, ptr %17, i32 0, i32 2
  %134 = load i32, ptr %133, align 4, !tbaa !13
  %135 = add nsw i32 %132, %134
  store i32 %135, ptr %20, align 4, !tbaa !9
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %130, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 2
  store i32 %137, ptr %138, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %139 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 1
  %140 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 2
  %141 = getelementptr inbounds %struct.node, ptr %17, i32 0, i32 3
  %142 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %143 = getelementptr inbounds %struct.node, ptr %17, i32 0, i32 2
  %144 = load i32, ptr %143, align 4, !tbaa !13
  %145 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !14
  %147 = add nsw i32 %144, %146
  store i32 %147, ptr %21, align 4, !tbaa !9
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %142, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %141, ptr noundef nonnull align 4 dereferenceable(4) %148)
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %140, ptr noundef nonnull align 4 dereferenceable(4) %149)
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %139, ptr noundef nonnull align 4 dereferenceable(4) %150)
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 3
  store i32 %152, ptr %153, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %14, i64 16, i1 false), !tbaa.struct !16
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  br label %154

154:                                              ; preds = %87, %73, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %155

155:                                              ; preds = %154, %42, %33
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  %156 = load { i64, i64 }, ptr %7, align 4
  ret { i64, i64 } %156
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 12}
!12 = !{!"_ZTS4node", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !10, i64 0}
!16 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9}


; 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 local_unnamed_addr global [40004 x %struct.node], align 16

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

; 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 #1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local { i64, i64 } @_Z5queryPiiiiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #2 {
  %7 = alloca %struct.node, align 16
  %8 = alloca %struct.node, align 8
  %9 = alloca %struct.node, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  %13 = getelementptr inbounds i8, ptr %7, i64 12
  %14 = getelementptr inbounds i8, ptr %7, i64 8
  %15 = getelementptr inbounds i8, ptr %7, i64 4
  store <4 x i32> <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>, ptr %7, align 16, !tbaa !5
  %16 = icmp slt i32 %5, %2
  %17 = icmp slt i32 %3, %4
  %or.cond = or i1 %17, %16
  br i1 %or.cond, label %18, label %19

18:                                               ; preds = %6
  %.sroa.0.0.copyload = load i64, ptr %7, align 16
  %.sroa.6.0.copyload = load i64, ptr %14, align 8
  br label %78

19:                                               ; preds = %6
  %.not = icmp sgt i32 %4, %2
  %.not48 = icmp sgt i32 %3, %5
  %or.cond50 = or i1 %.not, %.not48
  br i1 %or.cond50, label %23, label %20

20:                                               ; preds = %19
  %21 = sext i32 %1 to i64
  %22 = getelementptr inbounds [40004 x %struct.node], ptr @tree, i64 0, i64 %21
  %.sroa.0.0.copyload38 = load i64, ptr %22, align 16
  %.sroa.6.0..sroa_idx40 = getelementptr inbounds i8, ptr %22, i64 8
  %.sroa.6.0.copyload41 = load i64, ptr %.sroa.6.0..sroa_idx40, align 8
  br label %78

23:                                               ; preds = %19
  %24 = add nsw i32 %3, %2
  %25 = sdiv i32 %24, 2
  %26 = icmp slt i32 %25, %4
  br i1 %26, label %27, label %34

27:                                               ; preds = %23
  %28 = shl nsw i32 %1, 1
  %29 = add nsw i32 %28, 2
  %30 = add nsw i32 %25, 1
  %31 = tail call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %0, i32 noundef %29, i32 noundef %30, i32 noundef %3, i32 noundef %4, i32 noundef %5)
  %32 = extractvalue { i64, i64 } %31, 0
  %33 = extractvalue { i64, i64 } %31, 1
  br label %78

34:                                               ; preds = %23
  %.not49 = icmp slt i32 %25, %5
  br i1 %.not49, label %41, label %35

35:                                               ; preds = %34
  %36 = shl nsw i32 %1, 1
  %37 = or disjoint i32 %36, 1
  %38 = tail call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %0, i32 noundef %37, i32 noundef %2, i32 noundef %25, i32 noundef %4, i32 noundef %5)
  %39 = extractvalue { i64, i64 } %38, 0
  %40 = extractvalue { i64, i64 } %38, 1
  br label %78

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  %42 = shl nsw i32 %1, 1
  %43 = or disjoint i32 %42, 1
  %44 = tail call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %0, i32 noundef %43, i32 noundef %2, i32 noundef %25, i32 noundef %4, i32 noundef %5)
  %45 = extractvalue { i64, i64 } %44, 0
  store i64 %45, ptr %8, align 8
  %46 = getelementptr inbounds i8, ptr %8, i64 8
  %47 = extractvalue { i64, i64 } %44, 1
  store i64 %47, ptr %46, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  %48 = add nsw i32 %42, 2
  %49 = add nsw i32 %25, 1
  %50 = tail call { i64, i64 } @_Z5queryPiiiiii(ptr noundef %0, i32 noundef %48, i32 noundef %49, i32 noundef %3, i32 noundef %4, i32 noundef %5)
  %51 = extractvalue { i64, i64 } %50, 0
  store i64 %51, ptr %9, align 8
  %52 = getelementptr inbounds i8, ptr %9, i64 8
  %53 = extractvalue { i64, i64 } %50, 1
  store i64 %53, ptr %52, align 8
  %54 = trunc i64 %45 to i32
  %55 = trunc i64 %51 to i32
  %56 = add nsw i32 %55, %54
  store i32 %56, ptr %7, align 16, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %8, i64 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  %58 = getelementptr inbounds i8, ptr %9, i64 4
  %59 = lshr i64 %51, 32
  %60 = trunc nuw i64 %59 to i32
  %61 = add nsw i32 %60, %54
  store i32 %61, ptr %10, align 4, !tbaa !5
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %57, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %63 = load i32, ptr %62, align 4, !tbaa !5
  store i32 %63, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  %64 = load i32, ptr %46, align 8, !tbaa !12
  %65 = add nsw i32 %64, %55
  store i32 %65, ptr %11, align 4, !tbaa !5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %67 = load i32, ptr %66, align 4, !tbaa !5
  store i32 %67, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  %68 = getelementptr inbounds i8, ptr %8, i64 12
  %69 = getelementptr inbounds i8, ptr %9, i64 12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #3
  %70 = load i32, ptr %46, align 8, !tbaa !12
  %71 = load i32, ptr %58, align 4, !tbaa !11
  %72 = add nsw i32 %71, %70
  store i32 %72, ptr %12, align 4, !tbaa !5
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %69, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %68, ptr noundef nonnull align 4 dereferenceable(4) %73)
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %74)
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %75)
  %77 = load i32, ptr %76, align 4, !tbaa !5
  store i32 %77, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #3
  %.sroa.0.0.copyload39 = load i64, ptr %7, align 16
  %.sroa.6.0.copyload43 = load i64, ptr %14, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  br label %78

78:                                               ; preds = %27, %35, %41, %20, %18
  %.sroa.0.1 = phi i64 [ %.sroa.0.0.copyload, %18 ], [ %.sroa.0.0.copyload38, %20 ], [ %32, %27 ], [ %39, %35 ], [ %.sroa.0.0.copyload39, %41 ]
  %.sroa.6.1 = phi i64 [ %.sroa.6.0.copyload, %18 ], [ %.sroa.6.0.copyload41, %20 ], [ %33, %27 ], [ %40, %35 ], [ %.sroa.6.0.copyload43, %41 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.sroa.0.1, 0
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.sroa.6.1, 1
  ret { i64, i64 } %.fca.1.insert
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass