; LLVM IR from AlgoGenesis/C :: Greedy Algorithms/Maximum and minimum difference problem (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"

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1

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

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

15:                                               ; preds = %26, %0
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %29

20:                                               ; preds = %15
  %21 = load ptr, ptr %3, align 8, !tbaa !9
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i32, ptr %21, i64 %23
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %24)
  br label %26

26:                                               ; preds = %20
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %4, align 4, !tbaa !5
  br label %15, !llvm.loop !11

29:                                               ; preds = %19
  %30 = load ptr, ptr %3, align 8, !tbaa !9
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  call void @qsort(ptr noundef %30, i64 noundef %32, i64 noundef 4, ptr noundef @compare)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %76, %29
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sdiv i32 %35, 2
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %79

39:                                               ; preds = %33
  %40 = load ptr, ptr %3, align 8, !tbaa !9
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = sub nsw i32 %42, %43
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %40, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = load ptr, ptr %3, align 8, !tbaa !9
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %48, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sub nsw i32 %47, %52
  %54 = call i32 @llvm.abs.i32(i32 %53, i1 true)
  %55 = sext i32 %54 to i64
  %56 = load i64, ptr %6, align 8, !tbaa !13
  %57 = add nsw i64 %56, %55
  store i64 %57, ptr %6, align 8, !tbaa !13
  %58 = load ptr, ptr %3, align 8, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = mul nsw i32 2, %59
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %58, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = load ptr, ptr %3, align 8, !tbaa !9
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = mul nsw i32 2, %65
  %67 = add nsw i32 %66, 1
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %64, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sub nsw i32 %63, %70
  %72 = call i32 @llvm.abs.i32(i32 %71, i1 true)
  %73 = sext i32 %72 to i64
  %74 = load i64, ptr %5, align 8, !tbaa !13
  %75 = add nsw i64 %74, %73
  store i64 %75, ptr %5, align 8, !tbaa !13
  br label %76

76:                                               ; preds = %39
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !5
  br label %33, !llvm.loop !15

79:                                               ; preds = %38
  %80 = load i64, ptr %6, align 8, !tbaa !13
  %81 = load i64, ptr %5, align 8, !tbaa !13
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %80, i64 noundef %81)
  %83 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %83) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

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

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

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

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

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

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

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 = { "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 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 }
attributes #7 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !12}


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

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = sext i32 %4 to i64
  %6 = shl nsw i64 %5, 2
  %7 = call noalias ptr @malloc(i64 noundef %6) #9
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = sext i32 %9 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %48, %.lr.ph ]
  call void @qsort(ptr noundef %7, i64 noundef %.pre-phi, i64 noundef 4, ptr noundef nonnull @compare) #8
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 1
  br i1 %12, label %.lr.ph28.preheader, label %._crit_edge29

.lr.ph28.preheader:                               ; preds = %._crit_edge
  %13 = lshr i32 %11, 1
  %14 = zext nneg i32 %11 to i64
  %wide.trip.count = zext nneg i32 %13 to i64
  %15 = getelementptr i32, ptr %7, i64 %14
  %min.iters.check = icmp ult i32 %11, 8
  br i1 %min.iters.check, label %.lr.ph28.preheader56, label %vector.ph

.lr.ph28.preheader56:                             ; preds = %middle.block, %.lr.ph28.preheader
  %indvars.iv36.ph = phi i64 [ 0, %.lr.ph28.preheader ], [ %n.vec, %middle.block ]
  %.01925.ph = phi i64 [ 0, %.lr.ph28.preheader ], [ %43, %middle.block ]
  %.02024.ph = phi i64 [ 0, %.lr.ph28.preheader ], [ %44, %middle.block ]
  br label %.lr.ph28

vector.ph:                                        ; preds = %.lr.ph28.preheader
  %n.vec = and i64 %wide.trip.count, 1073741820
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %28, %vector.body ]
  %vec.phi43 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %29, %vector.body ]
  %vec.phi44 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %40, %vector.body ]
  %vec.phi45 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %41, %vector.body ]
  %16 = xor i64 %index, -1
  %17 = getelementptr i32, ptr %15, i64 %16
  %18 = getelementptr i8, ptr %17, i64 -4
  %19 = getelementptr i8, ptr %17, i64 -12
  %wide.load = load <2 x i32>, ptr %18, align 4, !tbaa !5
  %reverse = shufflevector <2 x i32> %wide.load, <2 x i32> poison, <2 x i32> <i32 1, i32 0>
  %wide.load46 = load <2 x i32>, ptr %19, align 4, !tbaa !5
  %reverse47 = shufflevector <2 x i32> %wide.load46, <2 x i32> poison, <2 x i32> <i32 1, i32 0>
  %20 = getelementptr inbounds i32, ptr %7, i64 %index
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %wide.load48 = load <2 x i32>, ptr %20, align 4, !tbaa !5
  %wide.load49 = load <2 x i32>, ptr %21, align 4, !tbaa !5
  %22 = sub nsw <2 x i32> %reverse, %wide.load48
  %23 = sub nsw <2 x i32> %reverse47, %wide.load49
  %24 = call <2 x i32> @llvm.abs.v2i32(<2 x i32> %22, i1 true)
  %25 = call <2 x i32> @llvm.abs.v2i32(<2 x i32> %23, i1 true)
  %26 = zext nneg <2 x i32> %24 to <2 x i64>
  %27 = zext nneg <2 x i32> %25 to <2 x i64>
  %28 = add <2 x i64> %vec.phi, %26
  %29 = add <2 x i64> %vec.phi43, %27
  %30 = shl i64 %index, 1
  %31 = or disjoint i64 %30, 4
  %.idx = shl nsw i64 %index, 3
  %32 = getelementptr inbounds i8, ptr %7, i64 %.idx
  %33 = getelementptr inbounds i32, ptr %7, i64 %31
  %wide.vec = load <4 x i32>, ptr %32, align 4, !tbaa !5
  %wide.vec50 = load <4 x i32>, ptr %33, align 4, !tbaa !5
  %strided.vec = shufflevector <4 x i32> %wide.vec, <4 x i32> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec51 = shufflevector <4 x i32> %wide.vec50, <4 x i32> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec52 = shufflevector <4 x i32> %wide.vec, <4 x i32> poison, <2 x i32> <i32 1, i32 3>
  %strided.vec53 = shufflevector <4 x i32> %wide.vec50, <4 x i32> poison, <2 x i32> <i32 1, i32 3>
  %34 = sub nsw <2 x i32> %strided.vec, %strided.vec52
  %35 = sub nsw <2 x i32> %strided.vec51, %strided.vec53
  %36 = call <2 x i32> @llvm.abs.v2i32(<2 x i32> %34, i1 true)
  %37 = call <2 x i32> @llvm.abs.v2i32(<2 x i32> %35, i1 true)
  %38 = zext nneg <2 x i32> %36 to <2 x i64>
  %39 = zext nneg <2 x i32> %37 to <2 x i64>
  %40 = add <2 x i64> %vec.phi44, %38
  %41 = add <2 x i64> %vec.phi45, %39
  %index.next = add nuw i64 %index, 4
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %29, %28
  %43 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %bin.rdx54 = add <2 x i64> %41, %40
  %44 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx54)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge29, label %.lr.ph28.preheader56

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %45 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %45)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next, %48
  br i1 %49, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge29:                                    ; preds = %.lr.ph28, %middle.block, %._crit_edge
  %.020.lcssa = phi i64 [ 0, %._crit_edge ], [ %44, %middle.block ], [ %69, %.lr.ph28 ]
  %.019.lcssa = phi i64 [ 0, %._crit_edge ], [ %43, %middle.block ], [ %59, %.lr.ph28 ]
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %.019.lcssa, i64 noundef %.020.lcssa)
  call void @free(ptr noundef %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

.lr.ph28:                                         ; preds = %.lr.ph28.preheader56, %.lr.ph28
  %indvars.iv36 = phi i64 [ %indvars.iv.next37, %.lr.ph28 ], [ %indvars.iv36.ph, %.lr.ph28.preheader56 ]
  %.01925 = phi i64 [ %59, %.lr.ph28 ], [ %.01925.ph, %.lr.ph28.preheader56 ]
  %.02024 = phi i64 [ %69, %.lr.ph28 ], [ %.02024.ph, %.lr.ph28.preheader56 ]
  %51 = xor i64 %indvars.iv36, -1
  %52 = getelementptr i32, ptr %15, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv36
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sub nsw i32 %53, %55
  %57 = call i32 @llvm.abs.i32(i32 %56, i1 true)
  %58 = zext nneg i32 %57 to i64
  %59 = add nuw nsw i64 %.01925, %58
  %60 = shl nuw nsw i64 %indvars.iv36, 1
  %61 = getelementptr inbounds i32, ptr %7, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = or disjoint i64 %60, 1
  %64 = getelementptr inbounds i32, ptr %7, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sub nsw i32 %62, %65
  %67 = call i32 @llvm.abs.i32(i32 %66, i1 true)
  %68 = zext nneg i32 %67 to i64
  %69 = add nuw nsw i64 %.02024, %68
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next37, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge29, label %.lr.ph28, !llvm.loop !14
}

; 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x i32> @llvm.abs.v2i32(<2 x i32>, i1 immarg) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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 = { 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 = { 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 #4 = { nofree "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { 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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass