; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/2546/main.ll (Z6updateiiiiii)

; 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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Data = type { i32, i32 }
%class.anon.5 = type { i8 }

@lazy = external dso_local global %"class.std::vector", align 8
@st = external dso_local global %"class.std::vector.0", align 8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_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.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z6middleii(i32 noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4lefti(i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5righti(i32 noundef) #2

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6updateiiiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #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
  %13 = alloca i32, align 4
  %14 = alloca %struct.Data, align 4
  %15 = alloca %class.anon.5, align 1
  store i32 %0, ptr %7, align 4, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !5
  %16 = load i32, ptr %7, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %17) #5
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %60

21:                                               ; preds = %6
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %23) #5
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %27) #5
  %29 = getelementptr inbounds %struct.Data, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = add nsw i32 %30, %25
  store i32 %31, ptr %29, align 4, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = icmp ne i32 %32, %33
  br i1 %34, label %35, label %56

35:                                               ; preds = %21
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %37) #5
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = call noundef i32 @_Z4lefti(i32 noundef %40)
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %42) #5
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, %39
  store i32 %45, ptr %43, align 4, !tbaa !5
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %47) #5
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = call noundef i32 @_Z5righti(i32 noundef %50)
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %52) #5
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, %49
  store i32 %55, ptr %53, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %35, %21
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %58) #5
  store i32 0, ptr %59, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %56, %6
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = icmp sgt i32 %61, %62
  br i1 %63, label %72, label %64

64:                                               ; preds = %60
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = load i32, ptr %11, align 4, !tbaa !5
  %67 = icmp sgt i32 %65, %66
  br i1 %67, label %72, label %68

68:                                               ; preds = %64
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %68, %64, %60
  br label %140

73:                                               ; preds = %68
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = icmp sle i32 %74, %75
  br i1 %76, label %77, label %108

77:                                               ; preds = %73
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = icmp sle i32 %78, %79
  br i1 %80, label %81, label %108

81:                                               ; preds = %77
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %84) #5
  %86 = getelementptr inbounds %struct.Data, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = add nsw i32 %87, %82
  store i32 %88, ptr %86, align 4, !tbaa !9
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = icmp ne i32 %89, %90
  br i1 %91, label %92, label %107

92:                                               ; preds = %81
  %93 = load i32, ptr %12, align 4, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = call noundef i32 @_Z4lefti(i32 noundef %94)
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %96) #5
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = add nsw i32 %98, %93
  store i32 %99, ptr %97, align 4, !tbaa !5
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = call noundef i32 @_Z5righti(i32 noundef %101)
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %103) #5
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add nsw i32 %105, %100
  store i32 %106, ptr %104, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %92, %81
  br label %140

108:                                              ; preds = %77, %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = call noundef i32 @_Z6middleii(i32 noundef %109, i32 noundef %110)
  store i32 %111, ptr %13, align 4, !tbaa !5
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = call noundef i32 @_Z4lefti(i32 noundef %112)
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = load i32, ptr %11, align 4, !tbaa !5
  %118 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z6updateiiiiii(i32 noundef %113, i32 noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef %117, i32 noundef %118)
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = call noundef i32 @_Z5righti(i32 noundef %119)
  %121 = load i32, ptr %13, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z6updateiiiiii(i32 noundef %120, i32 noundef %122, i32 noundef %123, i32 noundef %124, i32 noundef %125, i32 noundef %126)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = call noundef i32 @_Z4lefti(i32 noundef %127)
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %129) #5
  %131 = load i32, ptr %7, align 4, !tbaa !5
  %132 = call noundef i32 @_Z5righti(i32 noundef %131)
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %133) #5
  %135 = call i64 @"_ZZ6updateiiiiiiENK3$_0clERK4DataS2_"(ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef nonnull align 4 dereferenceable(8) %130, ptr noundef nonnull align 4 dereferenceable(8) %134)
  store i64 %135, ptr %14, align 4
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %137) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %138, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %139

139:                                              ; preds = %108
  br label %140

140:                                              ; preds = %139, %107, %72
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden i64 @"_ZZ6updateiiiiiiENK3$_0clERK4DataS2_"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #2 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 4}
!10 = !{!"_ZTS4Data", !6, i64 0, !6, i64 4}
!11 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}


; 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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon.5 = type { i8 }

@lazy = external dso_local global %"class.std::vector", align 8
@st = external dso_local global %"class.std::vector.0", align 8

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

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

; 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 i32 @_Z6middleii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4lefti(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5righti(i32 noundef) 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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z6updateiiiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
  %7 = alloca %class.anon.5, align 1
  %8 = sext i32 %0 to i64
  %9 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %8) #3
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %35, label %11

11:                                               ; preds = %6
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %8) #3
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %8) #3
  %15 = getelementptr inbounds i8, ptr %14, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !9
  %17 = add nsw i32 %16, %13
  store i32 %17, ptr %15, align 4, !tbaa !9
  %.not48 = icmp eq i32 %1, %2
  br i1 %.not48, label %33, label %18

18:                                               ; preds = %11
  %19 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %8) #3
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = tail call noundef i32 @_Z4lefti(i32 noundef %0)
  %22 = sext i32 %21 to i64
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %22) #3
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = add nsw i32 %24, %20
  store i32 %25, ptr %23, align 4, !tbaa !5
  %26 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %8) #3
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = tail call noundef i32 @_Z5righti(i32 noundef %0)
  %29 = sext i32 %28 to i64
  %30 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %29) #3
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = add nsw i32 %31, %27
  store i32 %32, ptr %30, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %18, %11
  %34 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %8) #3
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %33, %6
  %36 = icmp sgt i32 %1, %2
  %37 = icmp sgt i32 %1, %4
  %or.cond = or i1 %36, %37
  %38 = icmp slt i32 %2, %3
  %or.cond52 = or i1 %38, %or.cond
  br i1 %or.cond52, label %common.ret54, label %39

39:                                               ; preds = %35
  %.not49 = icmp sgt i32 %3, %1
  %.not50 = icmp sgt i32 %2, %4
  %or.cond53 = or i1 %.not49, %.not50
  br i1 %or.cond53, label %56, label %40

40:                                               ; preds = %39
  %41 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %8) #3
  %42 = getelementptr inbounds i8, ptr %41, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = add nsw i32 %43, %5
  store i32 %44, ptr %42, align 4, !tbaa !9
  %.not51 = icmp eq i32 %1, %2
  br i1 %.not51, label %common.ret54, label %45

45:                                               ; preds = %40
  %46 = tail call noundef i32 @_Z4lefti(i32 noundef %0)
  %47 = sext i32 %46 to i64
  %48 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %47) #3
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %49, %5
  store i32 %50, ptr %48, align 4, !tbaa !5
  %51 = tail call noundef i32 @_Z5righti(i32 noundef %0)
  %52 = sext i32 %51 to i64
  %53 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lazy, i64 noundef %52) #3
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, %5
  store i32 %55, ptr %53, align 4, !tbaa !5
  br label %common.ret54

common.ret54:                                     ; preds = %40, %45, %35, %56
  ret void

56:                                               ; preds = %39
  %57 = tail call noundef i32 @_Z6middleii(i32 noundef %1, i32 noundef %2)
  %58 = tail call noundef i32 @_Z4lefti(i32 noundef %0)
  tail call void @_Z6updateiiiiii(i32 noundef %58, i32 noundef %1, i32 noundef %57, i32 noundef %3, i32 noundef %4, i32 noundef %5)
  %59 = tail call noundef i32 @_Z5righti(i32 noundef %0)
  %60 = add nsw i32 %57, 1
  tail call void @_Z6updateiiiiii(i32 noundef %59, i32 noundef %60, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #3
  %61 = tail call noundef i32 @_Z4lefti(i32 noundef %0)
  %62 = sext i32 %61 to i64
  %63 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %62) #3
  %64 = tail call noundef i32 @_Z5righti(i32 noundef %0)
  %65 = sext i32 %64 to i64
  %66 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %65) #3
  %67 = call i64 @"_ZZ6updateiiiiiiENK3$_0clERK4DataS2_"(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 4 dereferenceable(8) %63, ptr noundef nonnull align 4 dereferenceable(8) %66)
  %68 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4DataSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @st, i64 noundef %8) #3
  store i64 %67, ptr %68, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #3
  br label %common.ret54
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden i64 @"_ZZ6updateiiiiiiENK3$_0clERK4DataS2_"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 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 = { 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 4}
!10 = !{!"_ZTS4Data", !6, i64 0, !6, i64 4}


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