; LLVM IR from DimitrisJim/leetcode_solutions :: C/Algorithms (1200)

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cmpi(ptr noundef, ptr 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: nounwind uwtable
define dso_local ptr @minimumAbsDifference(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 2147483647, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = sdiv i32 %20, 10
  %22 = add nsw i32 %21, 4
  store i32 %22, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = mul i64 %24, 8
  %26 = call noalias ptr @malloc(i64 noundef %25) #7
  store ptr %26, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = mul i64 %28, 4
  %30 = call noalias ptr @malloc(i64 noundef %29) #7
  store ptr %30, ptr %13, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  call void @qsort(ptr noundef %31, i64 noundef %33, i64 noundef 4, ptr noundef @cmpi)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %162, %4
  %35 = load i32, ptr %14, align 4, !tbaa !9
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = sub nsw i32 %36, 1
  %38 = icmp slt i32 %35, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %34
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %165

40:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load i32, ptr %14, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %41, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !9
  store i32 %46, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = load i32, ptr %14, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %47, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !9
  store i32 %51, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %52 = load i32, ptr %16, align 4, !tbaa !9
  %53 = load i32, ptr %17, align 4, !tbaa !9
  %54 = sub nsw i32 %52, %53
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %56, label %61

56:                                               ; preds = %40
  %57 = load i32, ptr %16, align 4, !tbaa !9
  %58 = sub nsw i32 0, %57
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = sub nsw i32 %58, %59
  br label %65

61:                                               ; preds = %40
  %62 = load i32, ptr %16, align 4, !tbaa !9
  %63 = load i32, ptr %17, align 4, !tbaa !9
  %64 = sub nsw i32 %62, %63
  br label %65

65:                                               ; preds = %61, %56
  %66 = phi i32 [ %60, %56 ], [ %64, %61 ]
  store i32 %66, ptr %18, align 4, !tbaa !9
  %67 = load i32, ptr %18, align 4, !tbaa !9
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %70, label %111

70:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %82, %70
  %72 = load i32, ptr %19, align 4, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %85

76:                                               ; preds = %71
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load i32, ptr %19, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  call void @free(ptr noundef %81) #6
  br label %82

82:                                               ; preds = %76
  %83 = load i32, ptr %19, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %19, align 4, !tbaa !9
  br label %71, !llvm.loop !11

85:                                               ; preds = %75
  store i32 0, ptr %11, align 4, !tbaa !9
  %86 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %86, ptr %9, align 4, !tbaa !9
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  store i32 2, ptr %90, align 4, !tbaa !9
  %91 = call noalias ptr @malloc(i64 noundef 8) #7
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = load i32, ptr %11, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  store ptr %91, ptr %95, align 8, !tbaa !5
  %96 = load i32, ptr %17, align 4, !tbaa !9
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %97, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds i32, ptr %101, i64 0
  store i32 %96, ptr %102, align 4, !tbaa !9
  %103 = load i32, ptr %16, align 4, !tbaa !9
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %11, align 4, !tbaa !9
  %107 = sext i32 %105 to i64
  %108 = getelementptr inbounds ptr, ptr %104, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = getelementptr inbounds i32, ptr %109, i64 1
  store i32 %103, ptr %110, align 4, !tbaa !9
  br label %161

111:                                              ; preds = %65
  %112 = load i32, ptr %18, align 4, !tbaa !9
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = icmp eq i32 %112, %113
  br i1 %114, label %115, label %160

115:                                              ; preds = %111
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = icmp sge i32 %117, %118
  br i1 %119, label %120, label %135

120:                                              ; preds = %115
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = sitofp i32 %121 to double
  %123 = fmul double %122, 1.500000e+00
  %124 = fptosi double %123 to i32
  store i32 %124, ptr %10, align 4, !tbaa !9
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load i32, ptr %10, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = mul i64 %127, 4
  %129 = call ptr @realloc(ptr noundef %125, i64 noundef %128) #8
  store ptr %129, ptr %13, align 8, !tbaa !5
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = load i32, ptr %10, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = mul i64 %132, 8
  %134 = call ptr @realloc(ptr noundef %130, i64 noundef %133) #8
  store ptr %134, ptr %12, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %120, %115
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  store i32 2, ptr %139, align 4, !tbaa !9
  %140 = call noalias ptr @malloc(i64 noundef 8) #7
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %141, i64 %143
  store ptr %140, ptr %144, align 8, !tbaa !5
  %145 = load i32, ptr %17, align 4, !tbaa !9
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds i32, ptr %150, i64 0
  store i32 %145, ptr %151, align 4, !tbaa !9
  %152 = load i32, ptr %16, align 4, !tbaa !9
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = load i32, ptr %11, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %11, align 4, !tbaa !9
  %156 = sext i32 %154 to i64
  %157 = getelementptr inbounds ptr, ptr %153, i64 %156
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  %159 = getelementptr inbounds i32, ptr %158, i64 1
  store i32 %152, ptr %159, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %135, %111
  br label %161

161:                                              ; preds = %160, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %14, align 4, !tbaa !9
  br label %34, !llvm.loop !13

165:                                              ; preds = %39
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %166, ptr %167, align 8, !tbaa !5
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %168, ptr %169, align 4, !tbaa !9
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret ptr %170
}

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

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

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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 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 = { 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 = { "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 = { 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 allocsize(1) "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) }
attributes #8 = { nounwind allocsize(1) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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"

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

; Function Attrs: nounwind uwtable
define dso_local noalias ptr @minimumAbsDifference(ptr noundef %0, i32 noundef %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = sdiv i32 %1, 10
  %6 = add nsw i32 %5, 4
  %7 = sext i32 %6 to i64
  %8 = shl nsw i64 %7, 3
  %9 = tail call noalias ptr @malloc(i64 noundef %8) #5
  %10 = shl nsw i64 %7, 2
  %11 = tail call noalias ptr @malloc(i64 noundef %10) #5
  %12 = sext i32 %1 to i64
  tail call void @qsort(ptr noundef %0, i64 noundef %12, i64 noundef 4, ptr noundef nonnull @cmpi) #6
  %13 = icmp sgt i32 %1, 1
  br i1 %13, label %.lr.ph82.preheader, label %._crit_edge83

.lr.ph82.preheader:                               ; preds = %4
  %14 = add nsw i32 %1, -1
  %wide.trip.count90 = zext nneg i32 %14 to i64
  br label %.lr.ph82

._crit_edge83:                                    ; preds = %48, %4
  %.068.lcssa = phi ptr [ %9, %4 ], [ %.270, %48 ]
  %.065.lcssa = phi ptr [ %11, %4 ], [ %.267, %48 ]
  %.062.lcssa = phi i32 [ 0, %4 ], [ %.163, %48 ]
  store ptr %.065.lcssa, ptr %3, align 8, !tbaa !5
  store i32 %.062.lcssa, ptr %2, align 4, !tbaa !9
  ret ptr %.068.lcssa

.lr.ph82:                                         ; preds = %.lr.ph82.preheader, %48
  %indvars.iv87 = phi i64 [ 0, %.lr.ph82.preheader ], [ %indvars.iv.next88, %48 ]
  %.05980 = phi i32 [ 2147483647, %.lr.ph82.preheader ], [ %.1, %48 ]
  %.06079 = phi i32 [ %6, %.lr.ph82.preheader ], [ %.2, %48 ]
  %.06278 = phi i32 [ 0, %.lr.ph82.preheader ], [ %.163, %48 ]
  %.06576 = phi ptr [ %11, %.lr.ph82.preheader ], [ %.267, %48 ]
  %.06875 = phi ptr [ %9, %.lr.ph82.preheader ], [ %.270, %48 ]
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %15 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next88
  %16 = load i32, ptr %15, align 4, !tbaa !9
  %17 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv87
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = sub nsw i32 %16, %18
  %20 = icmp slt i32 %19, 0
  %21 = add i32 %16, %18
  %22 = sub i32 0, %21
  %23 = select i1 %20, i32 %22, i32 %19
  %24 = icmp slt i32 %23, %.05980
  br i1 %24, label %.preheader, label %29

.preheader:                                       ; preds = %.lr.ph82
  %25 = icmp sgt i32 %.06278, 0
  br i1 %25, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %.06278 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  store i32 2, ptr %.06576, align 4, !tbaa !9
  %26 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #5
  store ptr %26, ptr %.06875, align 8, !tbaa !5
  br label %.sink.split

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %27 = getelementptr inbounds ptr, ptr %.06875, i64 %indvars.iv
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  tail call void @free(ptr noundef %28) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

29:                                               ; preds = %.lr.ph82
  %30 = icmp eq i32 %23, %.05980
  br i1 %30, label %31, label %48

31:                                               ; preds = %29
  %32 = add nsw i32 %.06278, 1
  %.not = icmp slt i32 %32, %.06079
  br i1 %.not, label %42, label %33

33:                                               ; preds = %31
  %34 = sitofp i32 %.06079 to double
  %35 = fmul double %34, 1.500000e+00
  %36 = fptosi double %35 to i32
  %37 = sext i32 %36 to i64
  %38 = shl nsw i64 %37, 2
  %39 = tail call ptr @realloc(ptr noundef %.06576, i64 noundef %38) #7
  %40 = shl nsw i64 %37, 3
  %41 = tail call ptr @realloc(ptr noundef %.06875, i64 noundef %40) #7
  br label %42

42:                                               ; preds = %33, %31
  %.169 = phi ptr [ %41, %33 ], [ %.06875, %31 ]
  %.166 = phi ptr [ %39, %33 ], [ %.06576, %31 ]
  %.161 = phi i32 [ %36, %33 ], [ %.06079, %31 ]
  %43 = sext i32 %.06278 to i64
  %44 = getelementptr inbounds i32, ptr %.166, i64 %43
  store i32 2, ptr %44, align 4, !tbaa !9
  %45 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #5
  %46 = getelementptr inbounds ptr, ptr %.169, i64 %43
  store ptr %45, ptr %46, align 8, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %._crit_edge, %42
  %.sink = phi ptr [ %45, %42 ], [ %26, %._crit_edge ]
  %.270.ph = phi ptr [ %.169, %42 ], [ %.06875, %._crit_edge ]
  %.267.ph = phi ptr [ %.166, %42 ], [ %.06576, %._crit_edge ]
  %.163.ph = phi i32 [ %32, %42 ], [ 1, %._crit_edge ]
  %.2.ph = phi i32 [ %.161, %42 ], [ %.06079, %._crit_edge ]
  %.1.ph = phi i32 [ %.05980, %42 ], [ %23, %._crit_edge ]
  store i32 %18, ptr %.sink, align 4, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %.sink, i64 4
  store i32 %16, ptr %47, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %.sink.split, %29
  %.270 = phi ptr [ %.06875, %29 ], [ %.270.ph, %.sink.split ]
  %.267 = phi ptr [ %.06576, %29 ], [ %.267.ph, %.sink.split ]
  %.163 = phi i32 [ %.06278, %29 ], [ %.163.ph, %.sink.split ]
  %.2 = phi i32 [ %.06079, %29 ], [ %.2.ph, %.sink.split ]
  %.1 = phi i32 [ %.05980, %29 ], [ %.1.ph, %.sink.split ]
  %exitcond91.not = icmp eq i64 %indvars.iv.next88, %wide.trip.count90
  br i1 %exitcond91.not, label %._crit_edge83, label %.lr.ph82, !llvm.loop !13
}

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

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture 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: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #4

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 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 #2 = { 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 #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 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) 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 #5 = { nounwind allocsize(0) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(1) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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