; LLVM IR from serban/kmeans :: seq_main (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"

@_debug = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@optarg = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %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 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 ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca float, align 4
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr @_debug, align 4, !tbaa !5
  store float 0x3F50624DE0000000, ptr %18, align 4, !tbaa !11
  store i32 0, ptr %11, align 4, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !5
  store ptr null, ptr %15, align 8, !tbaa !9
  br label %23

23:                                               ; preds = %52, %2
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = call i32 @getopt(i32 noundef %24, ptr noundef %25, ptr noundef @.str) #7
  store i32 %26, ptr %6, align 4, !tbaa !5
  %27 = icmp ne i32 %26, -1
  br i1 %27, label %28, label %53

28:                                               ; preds = %23
  %29 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %29, label %47 [
    i32 105, label %30
    i32 98, label %32
    i32 116, label %33
    i32 110, label %37
    i32 111, label %40
    i32 100, label %41
    i32 63, label %42
  ]

30:                                               ; preds = %28
  %31 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %31, ptr %15, align 8, !tbaa !9
  br label %52

32:                                               ; preds = %28
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %52

33:                                               ; preds = %28
  %34 = load ptr, ptr @optarg, align 8, !tbaa !9
  %35 = call double @atof(ptr noundef %34) #8
  %36 = fptrunc double %35 to float
  store float %36, ptr %18, align 4, !tbaa !11
  br label %52

37:                                               ; preds = %28
  %38 = load ptr, ptr @optarg, align 8, !tbaa !9
  %39 = call i32 @atoi(ptr noundef %38) #8
  store i32 %39, ptr %11, align 4, !tbaa !5
  br label %52

40:                                               ; preds = %28
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %52

41:                                               ; preds = %28
  store i32 1, ptr @_debug, align 4, !tbaa !5
  br label %52

42:                                               ; preds = %28
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = getelementptr inbounds ptr, ptr %43, i64 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = load float, ptr %18, align 4, !tbaa !11
  call void @usage(ptr noundef %45, float noundef %46)
  br label %52

47:                                               ; preds = %28
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = getelementptr inbounds ptr, ptr %48, i64 0
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = load float, ptr %18, align 4, !tbaa !11
  call void @usage(ptr noundef %50, float noundef %51)
  br label %52

52:                                               ; preds = %47, %42, %41, %40, %37, %33, %32, %30
  br label %23, !llvm.loop !13

53:                                               ; preds = %23
  %54 = load ptr, ptr %15, align 8, !tbaa !9
  %55 = icmp eq ptr %54, null
  br i1 %55, label %59, label %56

56:                                               ; preds = %53
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = icmp sle i32 %57, 1
  br i1 %58, label %59, label %64

59:                                               ; preds = %56, %53
  %60 = load ptr, ptr %5, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %60, i64 0
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = load float, ptr %18, align 4, !tbaa !11
  call void @usage(ptr noundef %62, float noundef %63)
  br label %64

64:                                               ; preds = %59, %56
  %65 = load i32, ptr %10, align 4, !tbaa !5
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %69

67:                                               ; preds = %64
  %68 = call double @wtime()
  store double %68, ptr %20, align 8, !tbaa !15
  br label %69

69:                                               ; preds = %67, %64
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = load ptr, ptr %15, align 8, !tbaa !9
  %72 = call ptr @file_read(i32 noundef %70, ptr noundef %71, ptr noundef %13, ptr noundef %12)
  store ptr %72, ptr %16, align 8, !tbaa !9
  %73 = load ptr, ptr %16, align 8, !tbaa !9
  %74 = icmp eq ptr %73, null
  br i1 %74, label %75, label %76

75:                                               ; preds = %69
  call void @exit(i32 noundef 1) #9
  unreachable

76:                                               ; preds = %69
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %85

79:                                               ; preds = %76
  %80 = call double @wtime()
  store double %80, ptr %19, align 8, !tbaa !15
  %81 = load double, ptr %19, align 8, !tbaa !15
  %82 = load double, ptr %20, align 8, !tbaa !15
  %83 = fsub double %81, %82
  store double %83, ptr %20, align 8, !tbaa !15
  %84 = load double, ptr %19, align 8, !tbaa !15
  store double %84, ptr %21, align 8, !tbaa !15
  br label %85

85:                                               ; preds = %79, %76
  %86 = load i32, ptr %13, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = mul i64 %87, 4
  %89 = call noalias ptr @malloc(i64 noundef %88) #10
  store ptr %89, ptr %14, align 8, !tbaa !9
  %90 = load ptr, ptr %14, align 8, !tbaa !9
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %93

92:                                               ; preds = %85
  br label %94

93:                                               ; preds = %85
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 130, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

94:                                               ; preds = %92
  %95 = load ptr, ptr %16, align 8, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !5
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load float, ptr %18, align 4, !tbaa !11
  %100 = load ptr, ptr %14, align 8, !tbaa !9
  %101 = call ptr @seq_kmeans(ptr noundef %95, i32 noundef %96, i32 noundef %97, i32 noundef %98, float noundef %99, ptr noundef %100, ptr noundef %22)
  store ptr %101, ptr %17, align 8, !tbaa !9
  %102 = load ptr, ptr %16, align 8, !tbaa !9
  %103 = getelementptr inbounds ptr, ptr %102, i64 0
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  call void @free(ptr noundef %104) #7
  %105 = load ptr, ptr %16, align 8, !tbaa !9
  call void @free(ptr noundef %105) #7
  %106 = load i32, ptr %10, align 4, !tbaa !5
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %113

108:                                              ; preds = %94
  %109 = call double @wtime()
  store double %109, ptr %19, align 8, !tbaa !15
  %110 = load double, ptr %19, align 8, !tbaa !15
  %111 = load double, ptr %21, align 8, !tbaa !15
  %112 = fsub double %110, %111
  store double %112, ptr %21, align 8, !tbaa !15
  br label %113

113:                                              ; preds = %108, %94
  %114 = load ptr, ptr %15, align 8, !tbaa !9
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = load ptr, ptr %17, align 8, !tbaa !9
  %119 = load ptr, ptr %14, align 8, !tbaa !9
  %120 = call i32 @file_write(ptr noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef %117, ptr noundef %118, ptr noundef %119)
  %121 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %121) #7
  %122 = load ptr, ptr %17, align 8, !tbaa !9
  %123 = getelementptr inbounds ptr, ptr %122, i64 0
  %124 = load ptr, ptr %123, align 8, !tbaa !9
  call void @free(ptr noundef %124) #7
  %125 = load ptr, ptr %17, align 8, !tbaa !9
  call void @free(ptr noundef %125) #7
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %152

128:                                              ; preds = %113
  %129 = call double @wtime()
  %130 = load double, ptr %19, align 8, !tbaa !15
  %131 = fsub double %129, %130
  %132 = load double, ptr %20, align 8, !tbaa !15
  %133 = fadd double %132, %131
  store double %133, ptr %20, align 8, !tbaa !15
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %135 = load ptr, ptr %15, align 8, !tbaa !9
  %136 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %135)
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %137)
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %139)
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %141)
  %143 = load float, ptr %18, align 4, !tbaa !11
  %144 = fpext float %143 to double
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %144)
  %146 = load i32, ptr %22, align 4, !tbaa !5
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %146)
  %148 = load double, ptr %20, align 8, !tbaa !15
  %149 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %148)
  %150 = load double, ptr %21, align 8, !tbaa !15
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %150)
  br label %152

152:                                              ; preds = %128, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  ret i32 0
}

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef, float noundef) #0

declare double @wtime() #4

declare ptr @file_read(i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

declare ptr @seq_kmeans(ptr noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #4

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

declare i32 @file_write(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

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

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

attributes #0 = { 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 = { 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 nounwind willreturn memory(read) 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 = { "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 = { noreturn 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}


; 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"

@_debug = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store i32 0, ptr @_debug, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %.backedge, %2
  %.056 = phi i32 [ 0, %2 ], [ %.056.be, %.backedge ]
  %.054 = phi ptr [ null, %2 ], [ %.054.be, %.backedge ]
  %.052 = phi i32 [ 0, %2 ], [ %.052.be, %.backedge ]
  %.050 = phi i32 [ 0, %2 ], [ %.050.be, %.backedge ]
  %.048 = phi float [ 0x3F50624DE0000000, %2 ], [ %.048.be, %.backedge ]
  %7 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #9
  switch i32 %7, label %21 [
    i32 -1, label %23
    i32 105, label %8
    i32 98, label %.backedge
    i32 116, label %10
    i32 110, label %14
    i32 111, label %17
    i32 100, label %18
    i32 63, label %19
  ]

.backedge:                                        ; preds = %6, %21, %19, %18, %17, %14, %10, %8
  %.056.be = phi i32 [ %.056, %21 ], [ %.056, %19 ], [ %.056, %18 ], [ %.056, %17 ], [ %16, %14 ], [ %.056, %10 ], [ %.056, %8 ], [ %.056, %6 ]
  %.054.be = phi ptr [ %.054, %21 ], [ %.054, %19 ], [ %.054, %18 ], [ %.054, %17 ], [ %.054, %14 ], [ %.054, %10 ], [ %9, %8 ], [ %.054, %6 ]
  %.052.be = phi i32 [ %.052, %21 ], [ %.052, %19 ], [ %.052, %18 ], [ 1, %17 ], [ %.052, %14 ], [ %.052, %10 ], [ %.052, %8 ], [ %.052, %6 ]
  %.050.be = phi i32 [ %.050, %21 ], [ %.050, %19 ], [ %.050, %18 ], [ %.050, %17 ], [ %.050, %14 ], [ %.050, %10 ], [ %.050, %8 ], [ 1, %6 ]
  %.048.be = phi float [ %.048, %21 ], [ %.048, %19 ], [ %.048, %18 ], [ %.048, %17 ], [ %.048, %14 ], [ %13, %10 ], [ %.048, %8 ], [ %.048, %6 ]
  br label %6, !llvm.loop !9

8:                                                ; preds = %6
  %9 = load ptr, ptr @optarg, align 8, !tbaa !11
  br label %.backedge

10:                                               ; preds = %6
  %11 = load ptr, ptr @optarg, align 8, !tbaa !11
  %12 = tail call double @atof(ptr noundef %11) #10
  %13 = fptrunc double %12 to float
  br label %.backedge

14:                                               ; preds = %6
  %15 = load ptr, ptr @optarg, align 8, !tbaa !11
  %16 = tail call i32 @atoi(ptr nocapture noundef %15) #10
  br label %.backedge

17:                                               ; preds = %6
  br label %.backedge

18:                                               ; preds = %6
  store i32 1, ptr @_debug, align 4, !tbaa !5
  br label %.backedge

19:                                               ; preds = %6
  %20 = load ptr, ptr %1, align 8, !tbaa !11
  tail call void @usage(ptr noundef %20, float noundef %.048)
  br label %.backedge

21:                                               ; preds = %6
  %22 = load ptr, ptr %1, align 8, !tbaa !11
  tail call void @usage(ptr noundef %22, float noundef %.048)
  br label %.backedge

23:                                               ; preds = %6
  %24 = icmp eq ptr %.054, null
  %25 = icmp slt i32 %.056, 2
  %or.cond = select i1 %24, i1 true, i1 %25
  br i1 %or.cond, label %26, label %28

26:                                               ; preds = %23
  %27 = load ptr, ptr %1, align 8, !tbaa !11
  tail call void @usage(ptr noundef %27, float noundef %.048)
  br label %28

28:                                               ; preds = %23, %26
  %.not61 = icmp eq i32 %.052, 0
  br i1 %.not61, label %29, label %.thread

29:                                               ; preds = %28
  %30 = call ptr @file_read(i32 noundef %.050, ptr noundef %.054, ptr noundef nonnull %4, ptr noundef nonnull %3) #9
  %31 = icmp eq ptr %30, null
  br i1 %31, label %35, label %39

.thread:                                          ; preds = %28
  %32 = tail call double @wtime() #9
  %33 = call ptr @file_read(i32 noundef %.050, ptr noundef %.054, ptr noundef nonnull %4, ptr noundef nonnull %3) #9
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %36

35:                                               ; preds = %.thread, %29
  call void @exit(i32 noundef 1) #11
  unreachable

36:                                               ; preds = %.thread
  %37 = call double @wtime() #9
  %38 = fsub double %37, %32
  br label %39

39:                                               ; preds = %29, %36
  %40 = phi ptr [ %33, %36 ], [ %30, %29 ]
  %.145 = phi double [ %38, %36 ], [ undef, %29 ]
  %.0 = phi double [ %37, %36 ], [ undef, %29 ]
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = shl nsw i64 %42, 2
  %44 = call noalias ptr @malloc(i64 noundef %43) #12
  %.not62 = icmp eq ptr %44, null
  br i1 %.not62, label %45, label %46

45:                                               ; preds = %39
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 130, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

46:                                               ; preds = %39
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = call ptr @seq_kmeans(ptr noundef nonnull %40, i32 noundef %47, i32 noundef %41, i32 noundef %.056, float noundef %.048, ptr noundef nonnull %44, ptr noundef nonnull %5) #9
  %49 = load ptr, ptr %40, align 8, !tbaa !11
  call void @free(ptr noundef %49) #9
  call void @free(ptr noundef nonnull %40) #9
  br i1 %.not61, label %53, label %50

50:                                               ; preds = %46
  %51 = call double @wtime() #9
  %52 = fsub double %51, %.0
  br label %53

53:                                               ; preds = %50, %46
  %.147 = phi double [ %51, %50 ], [ %.0, %46 ]
  %.1 = phi double [ %52, %50 ], [ %.0, %46 ]
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = call i32 @file_write(ptr noundef %.054, i32 noundef %.056, i32 noundef %54, i32 noundef %55, ptr noundef %48, ptr noundef nonnull %44) #9
  call void @free(ptr noundef nonnull %44) #9
  %57 = load ptr, ptr %48, align 8, !tbaa !11
  call void @free(ptr noundef %57) #9
  call void @free(ptr noundef %48) #9
  br i1 %.not61, label %75, label %58

58:                                               ; preds = %53
  %59 = call double @wtime() #9
  %60 = fsub double %59, %.147
  %61 = fadd double %.145, %60
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %.054)
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %64)
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %66)
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.056)
  %69 = fpext float %.048 to double
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %69)
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %71)
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %61)
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %.1)
  br label %75

75:                                               ; preds = %58, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  ret i32 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: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef, float noundef) local_unnamed_addr #0

declare double @wtime() local_unnamed_addr #4

declare ptr @file_read(i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare ptr @seq_kmeans(ptr noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare i32 @file_write(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

attributes #0 = { 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 = { 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 nofree nounwind willreturn memory(read) 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 = { "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 = { noreturn 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 #6 = { 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 #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { noreturn nounwind }
attributes #12 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}


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