; LLVM IR from Water-Melon/Melon :: src (mln_matrix)

; 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.mln_matrix_t = type { i64, i64, ptr, i8 }

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_matrix_mul(ptr noundef nonnull %0, ptr noundef nonnull %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.mln_matrix_t, ptr %18, i32 0, i32 1
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.mln_matrix_t, ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !13
  %24 = icmp ne i64 %20, %23
  br i1 %24, label %25, label %27

25:                                               ; preds = %2
  %26 = call ptr @__errno_location() #6
  store i32 22, ptr %26, align 4, !tbaa !14
  store ptr null, ptr %3, align 8
  br label %115

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.mln_matrix_t, ptr %28, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !13
  store i64 %30, ptr %12, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.mln_matrix_t, ptr %31, i32 0, i32 1
  %33 = load i64, ptr %32, align 8, !tbaa !9
  store i64 %33, ptr %13, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.mln_matrix_t, ptr %34, i32 0, i32 1
  %36 = load i64, ptr %35, align 8, !tbaa !9
  store i64 %36, ptr %14, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.mln_matrix_t, ptr %37, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  store ptr %39, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.mln_matrix_t, ptr %40, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  store ptr %42, ptr %16, align 8, !tbaa !5
  %43 = load i64, ptr %12, align 8, !tbaa !15
  %44 = load i64, ptr %14, align 8, !tbaa !15
  %45 = mul i64 %44, 8
  %46 = call noalias ptr @calloc(i64 noundef %43, i64 noundef %45) #8
  store ptr %46, ptr %6, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %50

48:                                               ; preds = %27
  %49 = call ptr @__errno_location() #6
  store i32 12, ptr %49, align 4, !tbaa !14
  store ptr null, ptr %3, align 8
  store i32 1, ptr %17, align 4
  br label %114

50:                                               ; preds = %27
  %51 = load i64, ptr %12, align 8, !tbaa !15
  %52 = load i64, ptr %14, align 8, !tbaa !15
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call ptr @mln_matrix_new(i64 noundef %51, i64 noundef %52, ptr noundef %53, i32 noundef 0)
  store ptr %54, ptr %11, align 8, !tbaa !5
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %59

56:                                               ; preds = %50
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %57) #7
  %58 = call ptr @__errno_location() #6
  store i32 12, ptr %58, align 4, !tbaa !14
  store ptr null, ptr %3, align 8
  store i32 1, ptr %17, align 4
  br label %114

59:                                               ; preds = %50
  store i64 0, ptr %8, align 8, !tbaa !15
  br label %60

60:                                               ; preds = %109, %59
  %61 = load i64, ptr %8, align 8, !tbaa !15
  %62 = load i64, ptr %12, align 8, !tbaa !15
  %63 = icmp ult i64 %61, %62
  br i1 %63, label %64, label %112

64:                                               ; preds = %60
  store i64 0, ptr %10, align 8, !tbaa !15
  br label %65

65:                                               ; preds = %105, %64
  %66 = load i64, ptr %10, align 8, !tbaa !15
  %67 = load i64, ptr %13, align 8, !tbaa !15
  %68 = icmp ult i64 %66, %67
  br i1 %68, label %69, label %108

69:                                               ; preds = %65
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = load i64, ptr %8, align 8, !tbaa !15
  %72 = load i64, ptr %13, align 8, !tbaa !15
  %73 = mul i64 %71, %72
  %74 = load i64, ptr %10, align 8, !tbaa !15
  %75 = add i64 %73, %74
  %76 = getelementptr inbounds double, ptr %70, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !17
  store double %77, ptr %7, align 8, !tbaa !17
  store i64 0, ptr %9, align 8, !tbaa !15
  br label %78

78:                                               ; preds = %101, %69
  %79 = load i64, ptr %9, align 8, !tbaa !15
  %80 = load i64, ptr %14, align 8, !tbaa !15
  %81 = icmp ult i64 %79, %80
  br i1 %81, label %82, label %104

82:                                               ; preds = %78
  %83 = load double, ptr %7, align 8, !tbaa !17
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = load i64, ptr %10, align 8, !tbaa !15
  %86 = load i64, ptr %14, align 8, !tbaa !15
  %87 = mul i64 %85, %86
  %88 = load i64, ptr %9, align 8, !tbaa !15
  %89 = add i64 %87, %88
  %90 = getelementptr inbounds double, ptr %84, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !17
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load i64, ptr %8, align 8, !tbaa !15
  %94 = load i64, ptr %14, align 8, !tbaa !15
  %95 = mul i64 %93, %94
  %96 = load i64, ptr %9, align 8, !tbaa !15
  %97 = add i64 %95, %96
  %98 = getelementptr inbounds double, ptr %92, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !17
  %100 = call double @llvm.fmuladd.f64(double %83, double %91, double %99)
  store double %100, ptr %98, align 8, !tbaa !17
  br label %101

101:                                              ; preds = %82
  %102 = load i64, ptr %9, align 8, !tbaa !15
  %103 = add i64 %102, 1
  store i64 %103, ptr %9, align 8, !tbaa !15
  br label %78, !llvm.loop !19

104:                                              ; preds = %78
  br label %105

105:                                              ; preds = %104
  %106 = load i64, ptr %10, align 8, !tbaa !15
  %107 = add i64 %106, 1
  store i64 %107, ptr %10, align 8, !tbaa !15
  br label %65, !llvm.loop !21

108:                                              ; preds = %65
  br label %109

109:                                              ; preds = %108
  %110 = load i64, ptr %8, align 8, !tbaa !15
  %111 = add i64 %110, 1
  store i64 %111, ptr %8, align 8, !tbaa !15
  br label %60, !llvm.loop !22

112:                                              ; preds = %60
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %113, ptr %3, align 8
  store i32 1, ptr %17, align 4
  br label %114

114:                                              ; preds = %112, %56, %48
  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 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %115

115:                                              ; preds = %114, %25
  %116 = load ptr, ptr %3, align 8
  ret ptr %116
}

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #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 "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 willreturn memory(none) "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 allocsize(0,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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,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, !11, i64 8}
!10 = !{!"", !11, i64 0, !11, i64 8, !6, i64 16, !12, i64 24}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !6, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


; 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 ptr @mln_matrix_new(i64 noundef, i64 noundef, ptr noundef nonnull, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_matrix_mul(ptr nocapture noundef nonnull readonly %0, ptr nocapture noundef nonnull readonly %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = load i64, ptr %1, align 8, !tbaa !12
  %.not = icmp eq i64 %4, %5
  br i1 %.not, label %6, label %.loopexit.sink.split

6:                                                ; preds = %2
  %7 = load i64, ptr %0, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = shl i64 %9, 3
  %15 = tail call noalias ptr @calloc(i64 noundef %7, i64 noundef %14) #6
  %16 = icmp eq ptr %15, null
  br i1 %16, label %.loopexit.sink.split, label %17

17:                                               ; preds = %6
  %18 = tail call ptr @mln_matrix_new(i64 noundef %7, i64 noundef %9, ptr noundef %15, i32 noundef 0)
  %19 = icmp eq ptr %18, null
  br i1 %19, label %62, label %.preheader43

.preheader43:                                     ; preds = %17
  %.not52 = icmp eq i64 %7, 0
  %.not53 = icmp eq i64 %4, 0
  %or.cond = or i1 %.not52, %.not53
  %.not54 = icmp eq i64 %9, 0
  %or.cond59 = or i1 %or.cond, %.not54
  br i1 %or.cond59, label %.loopexit, label %.preheader.us.us.preheader

.preheader.us.us.preheader:                       ; preds = %.preheader43
  %20 = shl i64 %9, 3
  %21 = mul i64 %4, %9
  %22 = shl i64 %21, 3
  %scevgep62 = getelementptr i8, ptr %13, i64 %22
  %23 = getelementptr i8, ptr %15, i64 %20
  %min.iters.check = icmp ult i64 %9, 4
  %stride.check = icmp slt i64 %20, 0
  %n.vec = and i64 %9, -4
  %cmp.n = icmp eq i64 %9, %n.vec
  %xtraiter = and i64 %9, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us.us

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge47.split.us.us.us
  %.03648.us.us = phi i64 [ %61, %._crit_edge47.split.us.us.us ], [ 0, %.preheader.us.us.preheader ]
  %24 = mul i64 %20, %.03648.us.us
  %scevgep = getelementptr i8, ptr %15, i64 %24
  %scevgep61 = getelementptr i8, ptr %23, i64 %24
  %25 = mul i64 %.03648.us.us, %4
  %26 = getelementptr double, ptr %11, i64 %25
  %27 = mul i64 %.03648.us.us, %9
  %28 = getelementptr double, ptr %15, i64 %27
  %bound0 = icmp ult ptr %scevgep, %scevgep62
  %bound1 = icmp ult ptr %13, %scevgep61
  %found.conflict = and i1 %bound0, %bound1
  %29 = or i1 %found.conflict, %stride.check
  br label %.lr.ph.us.us.us

.lr.ph.us.us.us:                                  ; preds = %._crit_edge.us.us.us, %.preheader.us.us
  %.03845.us.us.us = phi i64 [ 0, %.preheader.us.us ], [ %60, %._crit_edge.us.us.us ]
  %30 = getelementptr double, ptr %26, i64 %.03845.us.us.us
  %31 = load double, ptr %30, align 8, !tbaa !14
  %32 = mul i64 %.03845.us.us.us, %9
  %33 = getelementptr double, ptr %13, i64 %32
  %brmerge = select i1 %min.iters.check, i1 true, i1 %29
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.us.us.us
  %broadcast.splatinsert = insertelement <2 x double> poison, double %31, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %34 = getelementptr double, ptr %33, i64 %index
  %35 = getelementptr i8, ptr %34, i64 16
  %wide.load = load <2 x double>, ptr %34, align 8, !tbaa !14, !alias.scope !16
  %wide.load63 = load <2 x double>, ptr %35, align 8, !tbaa !14, !alias.scope !16
  %36 = getelementptr double, ptr %28, i64 %index
  %37 = getelementptr i8, ptr %36, i64 16
  %wide.load64 = load <2 x double>, ptr %36, align 8, !tbaa !14, !alias.scope !19, !noalias !16
  %wide.load65 = load <2 x double>, ptr %37, align 8, !tbaa !14, !alias.scope !19, !noalias !16
  %38 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load, <2 x double> %wide.load64)
  %39 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load63, <2 x double> %wide.load65)
  store <2 x double> %38, ptr %36, align 8, !tbaa !14, !alias.scope !19, !noalias !16
  store <2 x double> %39, ptr %37, align 8, !tbaa !14, !alias.scope !19, !noalias !16
  %index.next = add nuw i64 %index, 4
  %40 = icmp eq i64 %index.next, %n.vec
  br i1 %40, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us.us.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %.lr.ph.us.us.us, %middle.block
  %.03744.us.us.us.ph = phi i64 [ 0, %.lr.ph.us.us.us ], [ %n.vec, %middle.block ]
  %.neg = or disjoint i64 %.03744.us.us.us.ph, 1
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %41 = getelementptr double, ptr %33, i64 %.03744.us.us.us.ph
  %42 = load double, ptr %41, align 8, !tbaa !14
  %43 = getelementptr double, ptr %28, i64 %.03744.us.us.us.ph
  %44 = load double, ptr %43, align 8, !tbaa !14
  %45 = tail call double @llvm.fmuladd.f64(double %31, double %42, double %44)
  store double %45, ptr %43, align 8, !tbaa !14
  %46 = or disjoint i64 %.03744.us.us.us.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.03744.us.us.us.unr = phi i64 [ %.03744.us.us.us.ph, %scalar.ph.preheader ], [ %46, %scalar.ph.prol ]
  %47 = icmp eq i64 %9, %.neg
  br i1 %47, label %._crit_edge.us.us.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.03744.us.us.us = phi i64 [ %59, %scalar.ph ], [ %.03744.us.us.us.unr, %scalar.ph.prol.loopexit ]
  %48 = getelementptr double, ptr %33, i64 %.03744.us.us.us
  %49 = load double, ptr %48, align 8, !tbaa !14
  %50 = getelementptr double, ptr %28, i64 %.03744.us.us.us
  %51 = load double, ptr %50, align 8, !tbaa !14
  %52 = tail call double @llvm.fmuladd.f64(double %31, double %49, double %51)
  store double %52, ptr %50, align 8, !tbaa !14
  %53 = add nuw i64 %.03744.us.us.us, 1
  %54 = getelementptr double, ptr %33, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !14
  %56 = getelementptr double, ptr %28, i64 %53
  %57 = load double, ptr %56, align 8, !tbaa !14
  %58 = tail call double @llvm.fmuladd.f64(double %31, double %55, double %57)
  store double %58, ptr %56, align 8, !tbaa !14
  %59 = add nuw i64 %.03744.us.us.us, 2
  %exitcond.not.1 = icmp eq i64 %59, %9
  br i1 %exitcond.not.1, label %._crit_edge.us.us.us, label %scalar.ph, !llvm.loop !25

._crit_edge.us.us.us:                             ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %60 = add nuw i64 %.03845.us.us.us, 1
  %exitcond57.not = icmp eq i64 %60, %4
  br i1 %exitcond57.not, label %._crit_edge47.split.us.us.us, label %.lr.ph.us.us.us, !llvm.loop !26

._crit_edge47.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %61 = add nuw i64 %.03648.us.us, 1
  %exitcond58.not = icmp eq i64 %61, %7
  br i1 %exitcond58.not, label %.loopexit, label %.preheader.us.us, !llvm.loop !27

62:                                               ; preds = %17
  tail call void @free(ptr noundef nonnull %15) #7
  br label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %6, %2, %62
  %.sink = phi i32 [ 12, %62 ], [ 22, %2 ], [ 12, %6 ]
  %63 = tail call ptr @__errno_location() #8
  store i32 %.sink, ptr %63, align 4, !tbaa !28
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge47.split.us.us.us, %.loopexit.sink.split, %.preheader43
  %.1 = phi ptr [ %18, %.preheader43 ], [ null, %.loopexit.sink.split ], [ %18, %._crit_edge47.split.us.us.us ]
  ret ptr %.1
}

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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 = { 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 #2 = { mustprogress nofree nosync nounwind willreturn memory(none) "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,zeroed") allocsize(0,1) 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }

!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, !7, i64 8}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !10, i64 16}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = !{!17}
!17 = distinct !{!17, !18}
!18 = distinct !{!18, !"LVerDomain"}
!19 = !{!20}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !22, !23, !24}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !22, !23}
!26 = distinct !{!26, !22}
!27 = distinct !{!27, !22}
!28 = !{!11, !11, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass