; LLVM IR from AlgoGenesis/C :: Machine_Learning_Algorithms/K-Nearest Neighbors(KNN) (Program)

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

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [48 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @knn_classify(ptr noundef, i32 noundef, ptr, i32, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Point, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = 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
  %13 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2)
  %15 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = mul i64 %18, 16
  %20 = call noalias ptr @malloc(i64 noundef %19) #6
  store ptr %20, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %68, %0
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %71

26:                                               ; preds = %21
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = mul i64 %28, 8
  %30 = call noalias ptr @malloc(i64 noundef %29) #6
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds %struct.Point, ptr %31, i64 %33
  %35 = getelementptr inbounds %struct.Point, ptr %34, i32 0, i32 0
  store ptr %30, ptr %35, align 8, !tbaa !11
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %37)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %55, %26
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %58

44:                                               ; preds = %39
  %45 = load ptr, ptr %5, align 8, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.Point, ptr %45, i64 %47
  %49 = getelementptr inbounds %struct.Point, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %53)
  br label %55

55:                                               ; preds = %44
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %8, align 4, !tbaa !5
  br label %39, !llvm.loop !13

58:                                               ; preds = %43
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %60)
  %62 = load ptr, ptr %5, align 8, !tbaa !9
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %struct.Point, ptr %62, i64 %64
  %66 = getelementptr inbounds %struct.Point, ptr %65, i32 0, i32 1
  %67 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %66)
  br label %68

68:                                               ; preds = %58
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %6, align 4, !tbaa !5
  br label %21, !llvm.loop !15

71:                                               ; preds = %25
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %73 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = mul i64 %75, 8
  %77 = call noalias ptr @malloc(i64 noundef %76) #6
  %78 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 0
  store ptr %77, ptr %78, align 8, !tbaa !11
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %92, %71
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %95

85:                                               ; preds = %80
  %86 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = load i32, ptr %10, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %90)
  br label %92

92:                                               ; preds = %85
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %10, align 4, !tbaa !5
  br label %80, !llvm.loop !16

95:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %96 = load ptr, ptr %5, align 8, !tbaa !9
  %97 = load i32, ptr %2, align 4, !tbaa !5
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %103 = load i32, ptr %102, align 8
  %104 = call i32 @knn_classify(ptr noundef %96, i32 noundef %97, ptr %101, i32 %103, i32 noundef %98, i32 noundef %99)
  store i32 %104, ptr %11, align 4, !tbaa !5
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %105)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %119, %95
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %122

112:                                              ; preds = %107
  %113 = load ptr, ptr %5, align 8, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct.Point, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.Point, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !11
  call void @free(ptr noundef %118) #5
  br label %119

119:                                              ; preds = %112
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %12, align 4, !tbaa !5
  br label %107, !llvm.loop !17

122:                                              ; preds = %111
  %123 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %123) #5
  %124 = getelementptr inbounds %struct.Point, ptr %9, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !11
  call void @free(ptr noundef %125) #5
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, 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
  %126 = load i32, ptr %1, align 4
  ret i32 %126
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nounwind 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 #3 = { 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 = { "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 = { nounwind 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"", !10, i64 0, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


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

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [48 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @knn_classify(ptr noundef, i32 noundef, ptr, i32, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  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
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = shl nsw i64 %9, 4
  %11 = call noalias ptr @malloc(i64 noundef %10) #6
  %12 = icmp sgt i32 %8, 0
  br i1 %12, label %.lr.ph32, label %._crit_edge33

._crit_edge33:                                    ; preds = %._crit_edge, %0
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3)
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = shl nsw i64 %16, 3
  %18 = call noalias ptr @malloc(i64 noundef %17) #6
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph36, label %._crit_edge37

.lr.ph32:                                         ; preds = %0, %._crit_edge
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %._crit_edge ], [ 0, %0 ]
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = shl nsw i64 %23, 3
  %25 = call noalias ptr @malloc(i64 noundef %24) #6
  %26 = getelementptr inbounds %struct.Point, ptr %11, i64 %indvars.iv44
  store ptr %25, ptr %26, align 8, !tbaa !9
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %27 = trunc nuw nsw i64 %indvars.iv.next45 to i32
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %27)
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph32
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %27)
  %32 = getelementptr inbounds i8, ptr %26, i64 8
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %32)
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next45, %35
  br i1 %36, label %.lr.ph32, label %._crit_edge33, !llvm.loop !12

.lr.ph:                                           ; preds = %.lr.ph32, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph32 ]
  %37 = load ptr, ptr %26, align 8, !tbaa !9
  %38 = getelementptr inbounds double, ptr %37, i64 %indvars.iv
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef %38)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge37:                                    ; preds = %.lr.ph36, %._crit_edge33
  %.lcssa = phi i32 [ %20, %._crit_edge33 ], [ %51, %.lr.ph36 ]
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = call i32 @knn_classify(ptr noundef %11, i32 noundef %43, ptr %18, i32 undef, i32 noundef %.lcssa, i32 noundef %44)
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %45)
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph40, label %._crit_edge41

.lr.ph36:                                         ; preds = %._crit_edge33, %.lr.ph36
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %.lr.ph36 ], [ 0, %._crit_edge33 ]
  %49 = getelementptr inbounds double, ptr %18, i64 %indvars.iv47
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef %49)
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next48, %52
  br i1 %53, label %.lr.ph36, label %._crit_edge37, !llvm.loop !15

._crit_edge41:                                    ; preds = %.lr.ph40, %._crit_edge37
  call void @free(ptr noundef %11) #5
  call void @free(ptr noundef %18) #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

.lr.ph40:                                         ; preds = %._crit_edge37, %.lr.ph40
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %.lr.ph40 ], [ 0, %._crit_edge37 ]
  %54 = getelementptr inbounds %struct.Point, ptr %11, i64 %indvars.iv50
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  call void @free(ptr noundef %55) #5
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next51, %57
  br i1 %58, label %.lr.ph40, label %._crit_edge41, !llvm.loop !16
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


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