; LLVM IR from Dev-XYS/Algorithms :: Heavy-Light-Decomposition (main)

; 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.vertex = type { ptr, i32, i32, i32, i32, ptr, ptr, ptr }

@nil = external dso_local global ptr, align 8
@V = external dso_local global [100000 x %struct.vertex], align 16
@root = external dso_local global ptr, align 8
@ivc = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8add_edgeP6vertexS0_(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4DFS1P6vertexS0_i(ptr noundef, ptr noundef, i32 noundef) #0

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

; 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 @_Z4DFS2P6vertexS0_(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildRP4nodeii(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7tmodifyP6vertexi(ptr noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10tquery_sumP6vertexS0_(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10tquery_maxP6vertexS0_(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca [10 x i8], align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 10, ptr %6) #5
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @ivc)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %29, %0
  %11 = load i32, ptr %7, align 4, !tbaa !5
  %12 = load i32, ptr @ivc, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %32

15:                                               ; preds = %10
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %2, ptr noundef %3)
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds %struct.vertex, ptr @V, i64 %18
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds %struct.vertex, ptr @V, i64 %21
  call void @_Z8add_edgeP6vertexS0_(ptr noundef %19, ptr noundef %22)
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds %struct.vertex, ptr @V, i64 %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds %struct.vertex, ptr @V, i64 %27
  call void @_Z8add_edgeP6vertexS0_(ptr noundef %25, ptr noundef %28)
  br label %29

29:                                               ; preds = %15
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %7, align 4, !tbaa !5
  br label %10, !llvm.loop !9

32:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %44, %32
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = load i32, ptr @ivc, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %47

38:                                               ; preds = %33
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %struct.vertex, ptr @V, i64 %40
  %42 = getelementptr inbounds %struct.vertex, ptr %41, i32 0, i32 1
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %42)
  br label %44

44:                                               ; preds = %38
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %8, align 4, !tbaa !5
  br label %33, !llvm.loop !11

47:                                               ; preds = %37
  %48 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #6
  store ptr %48, ptr @nil, align 8, !tbaa !12
  %49 = load ptr, ptr @nil, align 8, !tbaa !12
  %50 = getelementptr inbounds %struct.vertex, ptr %49, i32 0, i32 3
  store i32 0, ptr %50, align 8, !tbaa !14
  %51 = load ptr, ptr @nil, align 8, !tbaa !12
  call void @_Z4DFS1P6vertexS0_i(ptr noundef getelementptr inbounds (%struct.vertex, ptr @V, i64 1), ptr noundef %51, i32 noundef 1)
  call void @_Z4DFS2P6vertexS0_(ptr noundef getelementptr inbounds (%struct.vertex, ptr @V, i64 1), ptr noundef getelementptr inbounds (%struct.vertex, ptr @V, i64 1))
  %52 = load i32, ptr @ivc, align 4, !tbaa !5
  call void @_Z5buildRP4nodeii(ptr noundef nonnull align 8 dereferenceable(8) @root, i32 noundef 1, i32 noundef %52)
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m)
  br label %54

54:                                               ; preds = %87, %47
  %55 = load i32, ptr @m, align 4, !tbaa !5
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr @m, align 4, !tbaa !5
  %57 = icmp ne i32 %55, 0
  br i1 %57, label %58, label %88

58:                                               ; preds = %54
  %59 = getelementptr inbounds [10 x i8], ptr %6, i64 0, i64 0
  %60 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %59, ptr noundef %4, ptr noundef %5)
  %61 = getelementptr inbounds [10 x i8], ptr %6, i64 0, i64 1
  %62 = load i8, ptr %61, align 1, !tbaa !16
  %63 = sext i8 %62 to i32
  switch i32 %63, label %87 [
    i32 72, label %64
    i32 83, label %69
    i32 77, label %78
  ]

64:                                               ; preds = %58
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %struct.vertex, ptr @V, i64 %66
  %68 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z7tmodifyP6vertexi(ptr noundef %67, i32 noundef %68)
  br label %87

69:                                               ; preds = %58
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %struct.vertex, ptr @V, i64 %71
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds %struct.vertex, ptr @V, i64 %74
  %76 = call noundef i32 @_Z10tquery_sumP6vertexS0_(ptr noundef %72, ptr noundef %75)
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %76)
  br label %87

78:                                               ; preds = %58
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %struct.vertex, ptr @V, i64 %80
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.vertex, ptr @V, i64 %83
  %85 = call noundef i32 @_Z10tquery_maxP6vertexS0_(ptr noundef %81, ptr noundef %84)
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %85)
  br label %87

87:                                               ; preds = %78, %69, %64, %58
  br label %54, !llvm.loop !17

88:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 10, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare i32 @printf(ptr noundef, ...) #3

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 = { 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 #3 = { "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 = { nobuiltin allocsize(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 }
attributes #6 = { builtin allocsize(0) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !6, i64 16}
!15 = !{!"_ZTS6vertex", !13, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !13, i64 24, !13, i64 32, !13, i64 40}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !10}


; 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.vertex = type { ptr, i32, i32, i32, i32, ptr, ptr, ptr }

@nil = external dso_local local_unnamed_addr global ptr, align 8
@V = external dso_local global [100000 x %struct.vertex], align 16
@root = external dso_local global ptr, align 8
@ivc = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8add_edgeP6vertexS0_(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4DFS1P6vertexS0_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

; 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 @_Z4DFS2P6vertexS0_(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildRP4nodeii(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7tmodifyP6vertexi(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10tquery_sumP6vertexS0_(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10tquery_maxP6vertexS0_(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [10 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %5) #5
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @ivc)
  %7 = load i32, ptr @ivc, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 1
  br i1 %8, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %.lr.ph, %0
  %9 = phi i32 [ %7, %0 ], [ %24, %.lr.ph ]
  %.not8 = icmp slt i32 %9, 1
  br i1 %.not8, label %._crit_edge, label %.lr.ph10

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.057 = phi i32 [ %23, %.lr.ph ], [ 1, %0 ]
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds %struct.vertex, ptr @V, i64 %12
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds %struct.vertex, ptr @V, i64 %15
  call void @_Z8add_edgeP6vertexS0_(ptr noundef nonnull %13, ptr noundef nonnull %16)
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds %struct.vertex, ptr @V, i64 %18
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds %struct.vertex, ptr @V, i64 %21
  call void @_Z8add_edgeP6vertexS0_(ptr noundef nonnull %19, ptr noundef nonnull %22)
  %23 = add nuw nsw i32 %.057, 1
  %24 = load i32, ptr @ivc, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %.lr.ph, label %.preheader, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph10, %.preheader
  %26 = call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #6
  store ptr %26, ptr @nil, align 8, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  store i32 0, ptr %27, align 8, !tbaa !13
  call void @_Z4DFS1P6vertexS0_i(ptr noundef nonnull getelementptr inbounds (i8, ptr @V, i64 48), ptr noundef nonnull %26, i32 noundef 1)
  call void @_Z4DFS2P6vertexS0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @V, i64 48), ptr noundef nonnull getelementptr inbounds (i8, ptr @V, i64 48))
  %28 = load i32, ptr @ivc, align 4, !tbaa !5
  call void @_Z5buildRP4nodeii(ptr noundef nonnull align 8 dereferenceable(8) @root, i32 noundef 1, i32 noundef %28)
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %31 = add nsw i32 %30, -1
  store i32 %31, ptr @m, align 4, !tbaa !5
  %.not611 = icmp eq i32 %30, 0
  br i1 %.not611, label %._crit_edge14, label %.lr.ph13

.lr.ph13:                                         ; preds = %._crit_edge
  %32 = getelementptr inbounds i8, ptr %5, i64 1
  br label %37

.lr.ph10:                                         ; preds = %.preheader, %.lr.ph10
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph10 ], [ 1, %.preheader ]
  %33 = getelementptr inbounds %struct.vertex, ptr @V, i64 %indvars.iv, i32 1
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %33)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %35 = load i32, ptr @ivc, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %.not.not = icmp slt i64 %indvars.iv, %36
  br i1 %.not.not, label %.lr.ph10, label %._crit_edge, !llvm.loop !15

37:                                               ; preds = %.lr.ph13, %63
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %5, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %39 = load i8, ptr %32, align 1, !tbaa !16
  switch i8 %39, label %63 [
    i8 72, label %40
    i8 83, label %45
    i8 77, label %54
  ]

40:                                               ; preds = %37
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.vertex, ptr @V, i64 %42
  %44 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z7tmodifyP6vertexi(ptr noundef nonnull %43, i32 noundef %44)
  br label %63

45:                                               ; preds = %37
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.vertex, ptr @V, i64 %47
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds %struct.vertex, ptr @V, i64 %50
  %52 = call noundef i32 @_Z10tquery_sumP6vertexS0_(ptr noundef nonnull %48, ptr noundef nonnull %51)
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %52)
  br label %63

54:                                               ; preds = %37
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct.vertex, ptr @V, i64 %56
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds %struct.vertex, ptr @V, i64 %59
  %61 = call noundef i32 @_Z10tquery_maxP6vertexS0_(ptr noundef nonnull %57, ptr noundef nonnull %60)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %61)
  br label %63

63:                                               ; preds = %54, %45, %40, %37
  %64 = load i32, ptr @m, align 4, !tbaa !5
  %65 = add nsw i32 %64, -1
  store i32 %65, ptr @m, align 4, !tbaa !5
  %.not6 = icmp eq i32 %64, 0
  br i1 %.not6, label %._crit_edge14, label %37, !llvm.loop !17

._crit_edge14:                                    ; preds = %63, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nobuiltin allocsize(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 }
attributes #6 = { builtin allocsize(0) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS6vertex", !12, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !12, i64 24, !12, i64 32, !12, i64 40}
!15 = distinct !{!15, !10}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass