; LLVM IR from sp-nitech/SPTK :: third_party/SWIPE (swipe)

; 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.sptk::swipe::vector" = type { i32, ptr }
%"struct.sptk::swipe::intvector" = type { i32, ptr }
%"struct.sptk::swipe::matrix" = type { i32, i32, ptr }

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

declare { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare void @_ZN4sptk5swipe5freevENS0_6vectorE(i32, ptr) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, ptr } @_ZN4sptk5swipe8loudnessENS0_6vectorES1_dii(i32, ptr, i32, ptr, double noundef, i32 noundef, i32 noundef) #3

declare noundef i32 @_ZN4sptk5swipe7bisectvENS0_6vectorEd(i32, ptr, double noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk5swipe4SaddENS0_6matrixES1_NS0_6vectorES2_S2_NS0_9intvectorEddiii(i64, ptr, i64, ptr, i32, ptr, ptr noundef byval(%"struct.sptk::swipe::vector") align 8, ptr noundef byval(%"struct.sptk::swipe::vector") align 8, ptr noundef byval(%"struct.sptk::swipe::intvector") align 8, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef) #3

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

declare void @_ZN4sptk5swipe5freemENS0_6matrixE(i64, ptr) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5swipe5SlastENS0_6matrixENS0_6vectorES2_S2_S2_NS0_9intvectorES3_dddi(i64 %0, ptr %1, i32 %2, ptr %3, i32 %4, ptr %5, ptr noundef byval(%"struct.sptk::swipe::vector") align 8 %6, ptr noundef byval(%"struct.sptk::swipe::vector") align 8 %7, ptr noundef byval(%"struct.sptk::swipe::intvector") align 8 %8, ptr noundef byval(%"struct.sptk::swipe::intvector") align 8 %9, double noundef %10, double noundef %11, double noundef %12, i32 noundef %13) #3 {
  %15 = alloca %"struct.sptk::swipe::matrix", align 8
  %16 = alloca %"struct.sptk::swipe::vector", align 8
  %17 = alloca %"struct.sptk::swipe::vector", align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.sptk::swipe::matrix", align 8
  %25 = alloca %"struct.sptk::swipe::vector", align 8
  %26 = alloca %"struct.sptk::swipe::vector", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"struct.sptk::swipe::vector", align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.sptk::swipe::vector", align 8
  %32 = alloca %"struct.sptk::swipe::vector", align 8
  %33 = alloca i32, align 4
  %34 = alloca %"struct.sptk::swipe::matrix", align 8
  %35 = alloca %"struct.sptk::swipe::matrix", align 8
  %36 = alloca %"struct.sptk::swipe::vector", align 8
  %37 = alloca %"struct.sptk::swipe::vector", align 8
  %38 = alloca %"struct.sptk::swipe::vector", align 8
  %39 = alloca %"struct.sptk::swipe::intvector", align 8
  %40 = alloca %"struct.sptk::swipe::matrix", align 8
  %41 = alloca %"struct.sptk::swipe::vector", align 8
  %42 = alloca %"struct.sptk::swipe::vector", align 8
  %43 = getelementptr inbounds { i64, ptr }, ptr %15, i32 0, i32 0
  store i64 %0, ptr %43, align 8
  %44 = getelementptr inbounds { i64, ptr }, ptr %15, i32 0, i32 1
  store ptr %1, ptr %44, align 8
  %45 = getelementptr inbounds { i32, ptr }, ptr %16, i32 0, i32 0
  store i32 %2, ptr %45, align 8
  %46 = getelementptr inbounds { i32, ptr }, ptr %16, i32 0, i32 1
  store ptr %3, ptr %46, align 8
  %47 = getelementptr inbounds { i32, ptr }, ptr %17, i32 0, i32 0
  store i32 %4, ptr %47, align 8
  %48 = getelementptr inbounds { i32, ptr }, ptr %17, i32 0, i32 1
  store ptr %5, ptr %48, align 8
  store double %10, ptr %18, align 8, !tbaa !5
  store double %11, ptr %19, align 8, !tbaa !5
  store double %12, ptr %20, align 8, !tbaa !5
  store i32 %13, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %49 = getelementptr inbounds %"struct.sptk::swipe::intvector", ptr %8, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = load i32, ptr %21, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %50, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = sdiv i32 %54, 2
  store i32 %55, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !14
  %56 = load double, ptr %18, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.sptk::swipe::intvector", ptr %8, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load i32, ptr %21, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr %58, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = load i32, ptr %23, align 4, !tbaa !9
  %64 = getelementptr inbounds { i32, ptr }, ptr %25, i32 0, i32 0
  %65 = load i32, ptr %64, align 8
  %66 = getelementptr inbounds { i32, ptr }, ptr %25, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8
  %68 = getelementptr inbounds { i32, ptr }, ptr %26, i32 0, i32 0
  %69 = load i32, ptr %68, align 8
  %70 = getelementptr inbounds { i32, ptr }, ptr %26, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8
  %72 = call { i64, ptr } @_ZN4sptk5swipe8loudnessENS0_6vectorES1_dii(i32 %65, ptr %67, i32 %69, ptr %71, double noundef %56, i32 noundef %62, i32 noundef %63)
  %73 = getelementptr inbounds { i64, ptr }, ptr %24, i32 0, i32 0
  %74 = extractvalue { i64, ptr } %72, 0
  store i64 %74, ptr %73, align 8
  %75 = getelementptr inbounds { i64, ptr }, ptr %24, i32 0, i32 1
  %76 = extractvalue { i64, ptr } %72, 1
  store ptr %76, ptr %75, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !14
  %77 = load i32, ptr %21, align 4, !tbaa !9
  %78 = sitofp i32 %77 to double
  %79 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 0
  %80 = load i32, ptr %79, align 8
  %81 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8
  %83 = call noundef i32 @_ZN4sptk5swipe7bisectvENS0_6vectorEd(i32 %80, ptr %82, double noundef %78)
  store i32 %83, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %84 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %7, i32 0, i32 0
  %85 = load i32, ptr %84, align 8, !tbaa !16
  store i32 %85, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %86 = load i32, ptr %29, align 4, !tbaa !9
  %87 = load i32, ptr %27, align 4, !tbaa !9
  %88 = sub nsw i32 %86, %87
  store i32 %88, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  %89 = load i32, ptr %30, align 4, !tbaa !9
  %90 = call { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef %89)
  %91 = getelementptr inbounds { i32, ptr }, ptr %31, i32 0, i32 0
  %92 = extractvalue { i32, ptr } %90, 0
  store i32 %92, ptr %91, align 8
  %93 = getelementptr inbounds { i32, ptr }, ptr %31, i32 0, i32 1
  %94 = extractvalue { i32, ptr } %90, 1
  store ptr %94, ptr %93, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #5
  %95 = load i32, ptr %30, align 4, !tbaa !9
  %96 = call { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef %95)
  %97 = getelementptr inbounds { i32, ptr }, ptr %32, i32 0, i32 0
  %98 = extractvalue { i32, ptr } %96, 0
  store i32 %98, ptr %97, align 8
  %99 = getelementptr inbounds { i32, ptr }, ptr %32, i32 0, i32 1
  %100 = extractvalue { i32, ptr } %96, 1
  store ptr %100, ptr %99, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store i32 0, ptr %33, align 4, !tbaa !9
  %101 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %101, ptr %22, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %137, %14
  %103 = load i32, ptr %22, align 4, !tbaa !9
  %104 = load i32, ptr %29, align 4, !tbaa !9
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %106, label %140

106:                                              ; preds = %102
  %107 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %17, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load i32, ptr %22, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %108, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %32, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !18
  %115 = load i32, ptr %33, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %114, i64 %116
  store double %112, ptr %117, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %7, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !18
  %120 = load i32, ptr %22, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !5
  %124 = load i32, ptr %21, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  %126 = sitofp i32 %125 to double
  %127 = fsub double %123, %126
  %128 = call double @llvm.fabs.f64(double %127)
  %129 = fsub double 1.000000e+00, %128
  %130 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %31, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = load i32, ptr %33, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds double, ptr %131, i64 %133
  store double %129, ptr %134, align 8, !tbaa !5
  %135 = load i32, ptr %33, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %33, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %106
  %138 = load i32, ptr %22, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %22, align 4, !tbaa !9
  br label %102, !llvm.loop !19

140:                                              ; preds = %102
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %32, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %38, ptr align 8 %31, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !14
  %141 = load double, ptr %20, align 8, !tbaa !5
  %142 = load double, ptr %19, align 8, !tbaa !5
  %143 = load i32, ptr %27, align 4, !tbaa !9
  %144 = load i32, ptr %30, align 4, !tbaa !9
  %145 = load i32, ptr %23, align 4, !tbaa !9
  %146 = getelementptr inbounds { i64, ptr }, ptr %34, i32 0, i32 0
  %147 = load i64, ptr %146, align 8
  %148 = getelementptr inbounds { i64, ptr }, ptr %34, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8
  %150 = getelementptr inbounds { i64, ptr }, ptr %35, i32 0, i32 0
  %151 = load i64, ptr %150, align 8
  %152 = getelementptr inbounds { i64, ptr }, ptr %35, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8
  %154 = getelementptr inbounds { i32, ptr }, ptr %36, i32 0, i32 0
  %155 = load i32, ptr %154, align 8
  %156 = getelementptr inbounds { i32, ptr }, ptr %36, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8
  call void @_ZN4sptk5swipe4SaddENS0_6matrixES1_NS0_6vectorES2_S2_NS0_9intvectorEddiii(i64 %147, ptr %149, i64 %151, ptr %153, i32 %155, ptr %157, ptr noundef byval(%"struct.sptk::swipe::vector") align 8 %37, ptr noundef byval(%"struct.sptk::swipe::vector") align 8 %38, ptr noundef byval(%"struct.sptk::swipe::intvector") align 8 %39, double noundef %141, double noundef %142, i32 noundef %143, i32 noundef %144, i32 noundef %145)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %40, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !21
  %158 = getelementptr inbounds { i64, ptr }, ptr %40, i32 0, i32 0
  %159 = load i64, ptr %158, align 8
  %160 = getelementptr inbounds { i64, ptr }, ptr %40, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8
  call void @_ZN4sptk5swipe5freemENS0_6matrixE(i64 %159, ptr %161)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %41, ptr align 8 %31, i64 16, i1 false), !tbaa.struct !14
  %162 = getelementptr inbounds { i32, ptr }, ptr %41, i32 0, i32 0
  %163 = load i32, ptr %162, align 8
  %164 = getelementptr inbounds { i32, ptr }, ptr %41, i32 0, i32 1
  %165 = load ptr, ptr %164, align 8
  call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %163, ptr %165)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %32, i64 16, i1 false), !tbaa.struct !14
  %166 = getelementptr inbounds { i32, ptr }, ptr %42, i32 0, i32 0
  %167 = load i32, ptr %166, align 8
  %168 = getelementptr inbounds { i32, ptr }, ptr %42, i32 0, i32 1
  %169 = load ptr, ptr %168, align 8
  call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %167, ptr %169)
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN4sptk5swipe9intvectorE", !10, i64 0, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{i64 0, i64 4, !9, i64 8, i64 8, !15}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN4sptk5swipe6vectorE", !10, i64 0, !13, i64 8}
!18 = !{!17, !13, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 8, !15}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.sptk::swipe::vector" = type { i32, ptr }
%"struct.sptk::swipe::intvector" = type { i32, ptr }

declare { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef) local_unnamed_addr #0

declare void @_ZN4sptk5swipe5freevENS0_6vectorE(i32, ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local { i64, ptr } @_ZN4sptk5swipe8loudnessENS0_6vectorES1_dii(i32, ptr, i32, ptr, double noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare noundef i32 @_ZN4sptk5swipe7bisectvENS0_6vectorEd(i32, ptr, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk5swipe4SaddENS0_6matrixES1_NS0_6vectorES2_S2_NS0_9intvectorEddiii(i64, ptr, i64, ptr, i32, ptr, ptr noundef byval(%"struct.sptk::swipe::vector") align 8, ptr noundef byval(%"struct.sptk::swipe::vector") align 8, ptr noundef byval(%"struct.sptk::swipe::intvector") align 8, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

declare void @_ZN4sptk5swipe5freemENS0_6matrixE(i64, ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5swipe5SlastENS0_6matrixENS0_6vectorES2_S2_S2_NS0_9intvectorES3_dddi(i64 %0, ptr %1, i32 %2, ptr %3, i32 %4, ptr nocapture readonly %5, ptr nocapture noundef readonly byval(%"struct.sptk::swipe::vector") align 8 %6, ptr nocapture noundef readonly byval(%"struct.sptk::swipe::vector") align 8 %7, ptr nocapture noundef readonly byval(%"struct.sptk::swipe::intvector") align 8 %8, ptr nocapture noundef readonly byval(%"struct.sptk::swipe::intvector") align 8 %9, double noundef %10, double noundef %11, double noundef %12, i32 noundef %13) local_unnamed_addr #1 {
  %15 = ptrtoint ptr %5 to i64
  %16 = alloca %"struct.sptk::swipe::vector", align 8
  %17 = alloca %"struct.sptk::swipe::vector", align 8
  %18 = getelementptr inbounds i8, ptr %8, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = sext i32 %13 to i64
  %21 = getelementptr inbounds i32, ptr %19, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = sdiv i32 %22, 2
  %.sroa.031.0.copyload = load i32, ptr %6, align 8, !tbaa !11
  %.sroa.233.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.233.0.copyload = load ptr, ptr %.sroa.233.0..sroa_idx, align 8, !tbaa !12
  %24 = tail call { i64, ptr } @_ZN4sptk5swipe8loudnessENS0_6vectorES1_dii(i32 %2, ptr %3, i32 %.sroa.031.0.copyload, ptr %.sroa.233.0.copyload, double noundef %10, i32 noundef %22, i32 noundef %23)
  %.sroa.025.0.copyload = load i32, ptr %7, align 8, !tbaa !11
  %.sroa.227.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.227.0.copyload = load ptr, ptr %.sroa.227.0..sroa_idx, align 8, !tbaa !12
  %.sroa.227.0.copyload66 = ptrtoint ptr %.sroa.227.0.copyload to i64
  %25 = sitofp i32 %13 to double
  %26 = tail call noundef i32 @_ZN4sptk5swipe7bisectvENS0_6vectorEd(i32 %.sroa.025.0.copyload, ptr %.sroa.227.0.copyload, double noundef %25)
  %27 = sub i32 %.sroa.025.0.copyload, %26
  %28 = tail call { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef %27)
  %29 = extractvalue { i32, ptr } %28, 1
  %30 = ptrtoint ptr %29 to i64
  %31 = tail call { i32, ptr } @_ZN4sptk5swipe5makevEi(i32 noundef %27)
  %32 = extractvalue { i32, ptr } %31, 1
  %33 = ptrtoint ptr %32 to i64
  %34 = icmp slt i32 %26, %.sroa.025.0.copyload
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %35 = add nsw i32 %13, 1
  %36 = sitofp i32 %35 to double
  %37 = sext i32 %26 to i64
  %wide.trip.count = zext i32 %27 to i64
  %min.iters.check = icmp ult i32 %27, 16
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %38 = sub i64 %30, %33
  %diff.check = icmp ult i64 %38, 16
  %39 = shl nsw i64 %37, 3
  %40 = add i64 %39, %15
  %41 = sub i64 %33, %40
  %diff.check65 = icmp ult i64 %41, 16
  %conflict.rdx = or i1 %diff.check, %diff.check65
  %42 = add i64 %39, %.sroa.227.0.copyload66
  %43 = sub i64 %42, %33
  %diff.check67 = icmp ult i64 %43, 16
  %conflict.rdx68 = or i1 %conflict.rdx, %diff.check67
  %44 = add i64 %39, %15
  %45 = sub i64 %30, %44
  %diff.check69 = icmp ult i64 %45, 16
  %conflict.rdx70 = or i1 %conflict.rdx68, %diff.check69
  %46 = add i64 %39, %.sroa.227.0.copyload66
  %47 = sub i64 %30, %46
  %diff.check71 = icmp ult i64 %47, 16
  %conflict.rdx72 = or i1 %conflict.rdx70, %diff.check71
  br i1 %conflict.rdx72, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 4294967294
  %ind.end = add nsw i64 %n.vec, %37
  %broadcast.splatinsert = insertelement <2 x double> poison, double %36, 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 ]
  %offset.idx = add i64 %index, %37
  %48 = getelementptr inbounds double, ptr %5, i64 %offset.idx
  %wide.load = load <2 x double>, ptr %48, align 8, !tbaa !13
  %49 = getelementptr inbounds double, ptr %32, i64 %index
  store <2 x double> %wide.load, ptr %49, align 8, !tbaa !13
  %50 = getelementptr inbounds double, ptr %.sroa.227.0.copyload, i64 %offset.idx
  %wide.load74 = load <2 x double>, ptr %50, align 8, !tbaa !13
  %51 = fsub <2 x double> %wide.load74, %broadcast.splat
  %52 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %51)
  %53 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+00>, %52
  %54 = getelementptr inbounds double, ptr %29, i64 %index
  store <2 x double> %53, ptr %54, align 8, !tbaa !13
  %index.next = add nuw i64 %index, 2
  %55 = icmp eq i64 %index.next, %n.vec
  br i1 %55, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv60.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %indvars.iv.ph = phi i64 [ %37, %vector.memcheck ], [ %37, %.lr.ph ], [ %ind.end, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %56 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.ph
  %57 = load double, ptr %56, align 8, !tbaa !13
  %58 = getelementptr inbounds double, ptr %32, i64 %indvars.iv60.ph
  store double %57, ptr %58, align 8, !tbaa !13
  %59 = getelementptr inbounds double, ptr %.sroa.227.0.copyload, i64 %indvars.iv.ph
  %60 = load double, ptr %59, align 8, !tbaa !13
  %61 = fsub double %60, %36
  %62 = tail call double @llvm.fabs.f64(double %61)
  %63 = fsub double 1.000000e+00, %62
  %64 = getelementptr inbounds double, ptr %29, i64 %indvars.iv60.ph
  store double %63, ptr %64, align 8, !tbaa !13
  %indvars.iv.next61.prol = or disjoint i64 %indvars.iv60.ph, 1
  %indvars.iv.next.prol = add nsw i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv60.unr = phi i64 [ %indvars.iv60.ph, %scalar.ph.preheader ], [ %indvars.iv.next61.prol, %scalar.ph.prol ]
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %65 = add nsw i64 %wide.trip.count, -1
  %66 = icmp eq i64 %indvars.iv60.ph, %65
  br i1 %66, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv60 = phi i64 [ %indvars.iv.next61.1, %scalar.ph ], [ %indvars.iv60.unr, %scalar.ph.prol.loopexit ]
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %67 = getelementptr inbounds double, ptr %5, i64 %indvars.iv
  %68 = load double, ptr %67, align 8, !tbaa !13
  %69 = getelementptr inbounds double, ptr %32, i64 %indvars.iv60
  store double %68, ptr %69, align 8, !tbaa !13
  %70 = getelementptr inbounds double, ptr %.sroa.227.0.copyload, i64 %indvars.iv
  %71 = load double, ptr %70, align 8, !tbaa !13
  %72 = fsub double %71, %36
  %73 = tail call double @llvm.fabs.f64(double %72)
  %74 = fsub double 1.000000e+00, %73
  %75 = getelementptr inbounds double, ptr %29, i64 %indvars.iv60
  store double %74, ptr %75, align 8, !tbaa !13
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %76 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.next
  %77 = load double, ptr %76, align 8, !tbaa !13
  %78 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next61
  store double %77, ptr %78, align 8, !tbaa !13
  %79 = getelementptr inbounds double, ptr %.sroa.227.0.copyload, i64 %indvars.iv.next
  %80 = load double, ptr %79, align 8, !tbaa !13
  %81 = fsub double %80, %36
  %82 = tail call double @llvm.fabs.f64(double %81)
  %83 = fsub double 1.000000e+00, %82
  %84 = getelementptr inbounds double, ptr %29, i64 %indvars.iv.next61
  store double %83, ptr %84, align 8, !tbaa !13
  %indvars.iv.next61.1 = add nuw nsw i64 %indvars.iv60, 2
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next61.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge, label %scalar.ph, !llvm.loop !19

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %14
  %85 = extractvalue { i32, ptr } %31, 0
  %86 = extractvalue { i32, ptr } %28, 0
  %87 = extractvalue { i64, ptr } %24, 1
  %88 = extractvalue { i64, ptr } %24, 0
  store i32 %85, ptr %16, align 8, !tbaa !11
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  store ptr %32, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !12
  store i32 %86, ptr %17, align 8, !tbaa !11
  %.sroa.619.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 8
  store ptr %29, ptr %.sroa.619.0..sroa_idx, align 8, !tbaa !12
  tail call void @_ZN4sptk5swipe4SaddENS0_6matrixES1_NS0_6vectorES2_S2_NS0_9intvectorEddiii(i64 %0, ptr %1, i64 %88, ptr %87, i32 %.sroa.031.0.copyload, ptr %.sroa.233.0.copyload, ptr noundef nonnull byval(%"struct.sptk::swipe::vector") align 8 %16, ptr noundef nonnull byval(%"struct.sptk::swipe::vector") align 8 %17, ptr noundef nonnull byval(%"struct.sptk::swipe::intvector") align 8 %9, double noundef %12, double noundef %11, i32 noundef %26, i32 noundef %27, i32 noundef %23)
  tail call void @_ZN4sptk5swipe5freemENS0_6matrixE(i64 %88, ptr %87)
  tail call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %86, ptr %29)
  tail call void @_ZN4sptk5swipe5freevENS0_6vectorE(i32 %85, ptr %32)
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fabs.v2f64(<2 x double>) #3

attributes #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind speculatable 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, !10, i64 8}
!6 = !{!"_ZTSN4sptk5swipe9intvectorE", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = distinct !{!15, !16, !17, !18}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !16, !17}


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