; LLVM IR from DionysiosB/CodeForces :: CodeforcesEDU (PracticeSegmentTree4B-Cryptography)

; 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.segtree = type { i64, %"class.std::vector", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl" }
%"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl" = type { %"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl_data" }
%"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.matrix = type { i64, i64, i64, i64 }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %struct.segtree, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %struct.matrix, align 8
  %10 = alloca %struct.matrix, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %struct.matrix, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #6
  call void @_ZN7segtreeC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = load i64, ptr %2, align 8, !tbaa !5
  invoke void @_ZN7segtree4initExx(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %15, i64 noundef %16)
          to label %17 unwind label %23

17:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %38, %17
  %19 = load i64, ptr %8, align 8, !tbaa !5
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = icmp slt i64 %19, %20
  br i1 %21, label %27, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %45

23:                                               ; preds = %0
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %6, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %7, align 4
  br label %71

27:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  %28 = getelementptr inbounds %struct.matrix, ptr %9, i32 0, i32 0
  %29 = getelementptr inbounds %struct.matrix, ptr %9, i32 0, i32 1
  %30 = getelementptr inbounds %struct.matrix, ptr %9, i32 0, i32 2
  %31 = getelementptr inbounds %struct.matrix, ptr %9, i32 0, i32 3
  %32 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %31)
          to label %33 unwind label %41

33:                                               ; preds = %27
  %34 = load i64, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %9, i64 32, i1 false), !tbaa.struct !9
  invoke void @_ZN7segtree3setEx6matrix(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %34, ptr noundef byval(%struct.matrix) align 8 %10)
          to label %35 unwind label %41

35:                                               ; preds = %33
  %36 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2)
          to label %37 unwind label %41

37:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  br label %38

38:                                               ; preds = %37
  %39 = load i64, ptr %8, align 8, !tbaa !5
  %40 = add nsw i64 %39, 1
  store i64 %40, ptr %8, align 8, !tbaa !5
  br label %18, !llvm.loop !10

41:                                               ; preds = %35, %33, %27
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %71

45:                                               ; preds = %22
  br label %46

46:                                               ; preds = %59, %45
  %47 = load i64, ptr %4, align 8, !tbaa !5
  %48 = add nsw i64 %47, -1
  store i64 %48, ptr %4, align 8, !tbaa !5
  %49 = icmp ne i64 %47, 0
  br i1 %49, label %50, label %69

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %51 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %11, ptr noundef %12)
          to label %52 unwind label %60

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  %53 = load i64, ptr %11, align 8, !tbaa !5
  %54 = sub nsw i64 %53, 1
  %55 = load i64, ptr %12, align 8, !tbaa !5
  invoke void @_ZN7segtree7getProdExx(ptr dead_on_unwind writable sret(%struct.matrix) align 8 %13, ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %54, i64 noundef %55)
          to label %56 unwind label %64

56:                                               ; preds = %52
  invoke void @_ZN6matrix5printEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %57 unwind label %64

57:                                               ; preds = %56
  %58 = invoke i32 @puts(ptr noundef @.str.4)
          to label %59 unwind label %64

59:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %46, !llvm.loop !12

60:                                               ; preds = %50
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %6, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %7, align 4
  br label %68

64:                                               ; preds = %57, %56, %52
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %6, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %68

68:                                               ; preds = %64, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %71

69:                                               ; preds = %46
  store i32 0, ptr %1, align 4
  call void @_ZN7segtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %70 = load i32, ptr %1, align 4
  ret i32 %70

71:                                               ; preds = %68, %41, %23
  call void @_ZN7segtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %6, align 8
  %74 = load i32, ptr %7, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7segtreeC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7segtree4initExx(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7segtree3setEx6matrix(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef byval(%struct.matrix) align 8) #4 align 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) #5

; 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
declare dso_local void @_ZN7segtree7getProdExx(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 8, ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix5printEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

declare i32 @puts(ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7segtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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


; 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.segtree = type { i64, %"class.std::vector", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl" }
%"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl" = type { %"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl_data" }
%"struct.std::_Vector_base<matrix, std::allocator<matrix>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.matrix = type { i64, i64, i64, i64 }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %struct.segtree, align 8
  %5 = alloca %struct.matrix, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %struct.matrix, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #5
  call void @_ZN7segtreeC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  %10 = load i64, ptr %2, align 8, !tbaa !5
  %11 = load i64, ptr %1, align 8, !tbaa !5
  invoke void @_ZN7segtree4initExx(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %10, i64 noundef %11)
          to label %.preheader8 unwind label %19

.preheader8:                                      ; preds = %0
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = icmp sgt i64 %12, 0
  br i1 %13, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %.preheader8
  %14 = getelementptr inbounds i8, ptr %5, i64 8
  %15 = getelementptr inbounds i8, ptr %5, i64 16
  %16 = getelementptr inbounds i8, ptr %5, i64 24
  br label %21

.preheader:                                       ; preds = %23, %.preheader8
  %17 = load i64, ptr %3, align 8, !tbaa !5
  %18 = add nsw i64 %17, -1
  store i64 %18, ptr %3, align 8, !tbaa !5
  %.not10 = icmp eq i64 %17, 0
  br i1 %.not10, label %._crit_edge, label %.lr.ph11

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %41

21:                                               ; preds = %.lr.ph, %23
  %.09 = phi i64 [ 0, %.lr.ph ], [ %25, %23 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %5, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16)
  invoke void @_ZN7segtree3setEx6matrix(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.09, ptr noundef nonnull byval(%struct.matrix) align 8 %5)
          to label %23 unwind label %28

23:                                               ; preds = %21
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  %25 = add nuw nsw i64 %.09, 1
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %21, label %.preheader, !llvm.loop !9

28:                                               ; preds = %21
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %41

.lr.ph11:                                         ; preds = %.preheader, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %6, ptr noundef nonnull %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  %31 = load i64, ptr %6, align 8, !tbaa !5
  %32 = add nsw i64 %31, -1
  %33 = load i64, ptr %7, align 8, !tbaa !5
  invoke void @_ZN7segtree7getProdExx(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %32, i64 noundef %33)
          to label %34 unwind label %39

34:                                               ; preds = %.lr.ph11
  invoke void @_ZN6matrix5printEv(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %35 unwind label %39

35:                                               ; preds = %34
  %36 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %37 = load i64, ptr %3, align 8, !tbaa !5
  %38 = add nsw i64 %37, -1
  store i64 %38, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %37, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph11, !llvm.loop !11

39:                                               ; preds = %34, %.lr.ph11
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %41

._crit_edge:                                      ; preds = %35, %.preheader
  call void @_ZN7segtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

41:                                               ; preds = %39, %28, %19
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %40, %39 ], [ %20, %19 ]
  call void @_ZN7segtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7segtreeC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7segtree4initExx(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7segtree3setEx6matrix(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef byval(%struct.matrix) align 8) local_unnamed_addr #4 align 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 uwtable
declare dso_local void @_ZN7segtree7getProdExx(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 8, ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix5printEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7segtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass