; LLVM IR from sp-nitech/SPTK :: third_party/WORLD/common.ll (ZN4sptk5world15LinearSmoothingEPKddiiPd)

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

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

declare void @_ZN4sptk5world8interp1QEddPKdiS2_iPd(double noundef, double noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5world15LinearSmoothingEPKddiiPd(ptr noundef %0, double noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) #5 {
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store double %1, ptr %7, align 8, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !11
  store i32 %3, ptr %9, align 4, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %21 = load double, ptr %7, align 8, !tbaa !9
  %22 = load i32, ptr %9, align 4, !tbaa !11
  %23 = sitofp i32 %22 to double
  %24 = fmul double %21, %23
  %25 = load i32, ptr %8, align 4, !tbaa !11
  %26 = sitofp i32 %25 to double
  %27 = fdiv double %24, %26
  %28 = fptosi double %27 to i32
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %30 = load i32, ptr %9, align 4, !tbaa !11
  %31 = sdiv i32 %30, 2
  %32 = load i32, ptr %11, align 4, !tbaa !11
  %33 = mul nsw i32 %32, 2
  %34 = add nsw i32 %31, %33
  %35 = add nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %36, i64 8)
  %38 = extractvalue { i64, i1 } %37, 1
  %39 = extractvalue { i64, i1 } %37, 0
  %40 = select i1 %38, i64 -1, i64 %39
  %41 = call noalias noundef nonnull ptr @_Znam(i64 noundef %40) #8
  store ptr %41, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %42 = load i32, ptr %9, align 4, !tbaa !11
  %43 = sdiv i32 %42, 2
  %44 = load i32, ptr %11, align 4, !tbaa !11
  %45 = mul nsw i32 %44, 2
  %46 = add nsw i32 %43, %45
  %47 = add nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %48, i64 8)
  %50 = extractvalue { i64, i1 } %49, 1
  %51 = extractvalue { i64, i1 } %49, 0
  %52 = select i1 %50, i64 -1, i64 %51
  %53 = call noalias noundef nonnull ptr @_Znam(i64 noundef %52) #8
  store ptr %53, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %54 = load i32, ptr %9, align 4, !tbaa !11
  %55 = sdiv i32 %54, 2
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %57, i64 8)
  %59 = extractvalue { i64, i1 } %58, 1
  %60 = extractvalue { i64, i1 } %58, 0
  %61 = select i1 %59, i64 -1, i64 %60
  %62 = call noalias noundef nonnull ptr @_Znam(i64 noundef %61) #8
  store ptr %62, ptr %14, align 8, !tbaa !5
  %63 = load i32, ptr %11, align 4, !tbaa !11
  %64 = load i32, ptr %9, align 4, !tbaa !11
  %65 = load i32, ptr %8, align 4, !tbaa !11
  %66 = load double, ptr %7, align 8, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN4sptk5world12_GLOBAL__N_131SetParametersForLinearSmoothingEiiidPKdPdS4_S4_(i32 noundef %63, i32 noundef %64, i32 noundef %65, double noundef %66, ptr noundef %67, ptr noundef %68, ptr noundef %69, ptr noundef %70)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %71 = load i32, ptr %9, align 4, !tbaa !11
  %72 = sdiv i32 %71, 2
  %73 = add nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %74, i64 8)
  %76 = extractvalue { i64, i1 } %75, 1
  %77 = extractvalue { i64, i1 } %75, 0
  %78 = select i1 %76, i64 -1, i64 %77
  %79 = call noalias noundef nonnull ptr @_Znam(i64 noundef %78) #8
  store ptr %79, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %80 = load i32, ptr %9, align 4, !tbaa !11
  %81 = sdiv i32 %80, 2
  %82 = add nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %83, i64 8)
  %85 = extractvalue { i64, i1 } %84, 1
  %86 = extractvalue { i64, i1 } %84, 0
  %87 = select i1 %85, i64 -1, i64 %86
  %88 = call noalias noundef nonnull ptr @_Znam(i64 noundef %87) #8
  store ptr %88, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %89 = load i32, ptr %11, align 4, !tbaa !11
  %90 = sitofp i32 %89 to double
  %91 = fsub double %90, 5.000000e-01
  %92 = fneg double %91
  %93 = load i32, ptr %8, align 4, !tbaa !11
  %94 = sitofp i32 %93 to double
  %95 = fmul double %92, %94
  %96 = load i32, ptr %9, align 4, !tbaa !11
  %97 = sitofp i32 %96 to double
  %98 = fdiv double %95, %97
  store double %98, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %99 = load i32, ptr %8, align 4, !tbaa !11
  %100 = sitofp i32 %99 to double
  %101 = load i32, ptr %9, align 4, !tbaa !11
  %102 = sitofp i32 %101 to double
  %103 = fdiv double %100, %102
  store double %103, ptr %18, align 8, !tbaa !9
  %104 = load double, ptr %17, align 8, !tbaa !9
  %105 = load double, ptr %18, align 8, !tbaa !9
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = load i32, ptr %9, align 4, !tbaa !11
  %108 = sdiv i32 %107, 2
  %109 = load i32, ptr %11, align 4, !tbaa !11
  %110 = mul nsw i32 %109, 2
  %111 = add nsw i32 %108, %110
  %112 = add nsw i32 %111, 1
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = load i32, ptr %9, align 4, !tbaa !11
  %115 = sdiv i32 %114, 2
  %116 = add nsw i32 %115, 1
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN4sptk5world8interp1QEddPKdiS2_iPd(double noundef %104, double noundef %105, ptr noundef %106, i32 noundef %112, ptr noundef %113, i32 noundef %116, ptr noundef %117)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %132, %5
  %119 = load i32, ptr %19, align 4, !tbaa !11
  %120 = load i32, ptr %9, align 4, !tbaa !11
  %121 = sdiv i32 %120, 2
  %122 = icmp sle i32 %119, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %135

124:                                              ; preds = %118
  %125 = load double, ptr %7, align 8, !tbaa !9
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  %127 = load i32, ptr %19, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds double, ptr %126, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = fadd double %130, %125
  store double %131, ptr %129, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %124
  %133 = load i32, ptr %19, align 4, !tbaa !11
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %19, align 4, !tbaa !11
  br label %118, !llvm.loop !13

135:                                              ; preds = %123
  %136 = load double, ptr %17, align 8, !tbaa !9
  %137 = load double, ptr %18, align 8, !tbaa !9
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = load i32, ptr %9, align 4, !tbaa !11
  %140 = sdiv i32 %139, 2
  %141 = load i32, ptr %11, align 4, !tbaa !11
  %142 = mul nsw i32 %141, 2
  %143 = add nsw i32 %140, %142
  %144 = add nsw i32 %143, 1
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = load i32, ptr %9, align 4, !tbaa !11
  %147 = sdiv i32 %146, 2
  %148 = add nsw i32 %147, 1
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN4sptk5world8interp1QEddPKdiS2_iPd(double noundef %136, double noundef %137, ptr noundef %138, i32 noundef %144, ptr noundef %145, i32 noundef %148, ptr noundef %149)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %150

150:                                              ; preds = %174, %135
  %151 = load i32, ptr %20, align 4, !tbaa !11
  %152 = load i32, ptr %9, align 4, !tbaa !11
  %153 = sdiv i32 %152, 2
  %154 = icmp sle i32 %151, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %177

156:                                              ; preds = %150
  %157 = load ptr, ptr %16, align 8, !tbaa !5
  %158 = load i32, ptr %20, align 4, !tbaa !11
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds double, ptr %157, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !9
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  %163 = load i32, ptr %20, align 4, !tbaa !11
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds double, ptr %162, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !9
  %167 = fsub double %161, %166
  %168 = load double, ptr %7, align 8, !tbaa !9
  %169 = fdiv double %167, %168
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = load i32, ptr %20, align 4, !tbaa !11
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds double, ptr %170, i64 %172
  store double %169, ptr %173, align 8, !tbaa !9
  br label %174

174:                                              ; preds = %156
  %175 = load i32, ptr %20, align 4, !tbaa !11
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %20, align 4, !tbaa !11
  br label %150, !llvm.loop !15

177:                                              ; preds = %155
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  %179 = icmp eq ptr %178, null
  br i1 %179, label %181, label %180

180:                                              ; preds = %177
  call void @_ZdaPv(ptr noundef %178) #9
  br label %181

181:                                              ; preds = %180, %177
  %182 = load ptr, ptr %13, align 8, !tbaa !5
  %183 = icmp eq ptr %182, null
  br i1 %183, label %185, label %184

184:                                              ; preds = %181
  call void @_ZdaPv(ptr noundef %182) #9
  br label %185

185:                                              ; preds = %184, %181
  %186 = load ptr, ptr %14, align 8, !tbaa !5
  %187 = icmp eq ptr %186, null
  br i1 %187, label %189, label %188

188:                                              ; preds = %185
  call void @_ZdaPv(ptr noundef %186) #9
  br label %189

189:                                              ; preds = %188, %185
  %190 = load ptr, ptr %15, align 8, !tbaa !5
  %191 = icmp eq ptr %190, null
  br i1 %191, label %193, label %192

192:                                              ; preds = %189
  call void @_ZdaPv(ptr noundef %190) #9
  br label %193

193:                                              ; preds = %192, %189
  %194 = load ptr, ptr %16, align 8, !tbaa !5
  %195 = icmp eq ptr %194, null
  br i1 %195, label %197, label %196

196:                                              ; preds = %193
  call void @_ZdaPv(ptr noundef %194) #9
  br label %197

197:                                              ; preds = %196, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN4sptk5world12_GLOBAL__N_131SetParametersForLinearSmoothingEiiidPKdPdS4_S4_(i32 noundef, i32 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin 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 = { nobuiltin 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 = { 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 #6 = { mustprogress 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

declare void @_ZN4sptk5world8interp1QEddPKdiS2_iPd(double noundef, double noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk5world15LinearSmoothingEPKddiiPd(ptr noundef %0, double noundef %1, i32 noundef %2, i32 noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #3 {
  %6 = sitofp i32 %3 to double
  %7 = fmul double %6, %1
  %8 = sitofp i32 %2 to double
  %9 = fdiv double %7, %8
  %10 = fptosi double %9 to i32
  %11 = add nsw i32 %10, 1
  %12 = sdiv i32 %3, 2
  %13 = shl nsw i32 %11, 1
  %14 = add nsw i32 %13, %12
  %15 = add nsw i32 %14, 1
  %16 = sext i32 %15 to i64
  %17 = icmp slt i32 %14, -1
  %18 = shl nsw i64 %16, 3
  %19 = select i1 %17, i64 -1, i64 %18
  %20 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %19) #5
  %21 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %19) #5
  %22 = add nsw i32 %12, 1
  %23 = sext i32 %22 to i64
  %24 = icmp slt i32 %3, -3
  %25 = shl nsw i64 %23, 3
  %26 = select i1 %24, i64 -1, i64 %25
  %27 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %26) #5
  tail call void @_ZN4sptk5world12_GLOBAL__N_131SetParametersForLinearSmoothingEiiidPKdPdS4_S4_(i32 noundef %11, i32 noundef %3, i32 noundef %2, double noundef %1, ptr noundef %0, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %27)
  %28 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %26) #5
  %29 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %26) #5
  %30 = sitofp i32 %11 to double
  %31 = fadd double %30, -5.000000e-01
  %32 = fneg double %31
  %33 = fmul double %8, %32
  %34 = fdiv double %33, %6
  %35 = fdiv double %8, %6
  tail call void @_ZN4sptk5world8interp1QEddPKdiS2_iPd(double noundef %34, double noundef %35, ptr noundef nonnull %21, i32 noundef %15, ptr noundef nonnull %27, i32 noundef %22, ptr noundef nonnull %28)
  %.not62 = icmp slt i32 %3, -1
  br i1 %.not62, label %._crit_edge.thread, label %.lr.ph.preheader

._crit_edge.thread:                               ; preds = %5
  tail call void @_ZN4sptk5world8interp1QEddPKdiS2_iPd(double noundef %34, double noundef %35, ptr noundef nonnull %21, i32 noundef %15, ptr noundef nonnull %27, i32 noundef %22, ptr noundef nonnull %29)
  br label %._crit_edge68

.lr.ph.preheader:                                 ; preds = %5
  %wide.trip.count = zext i32 %22 to i64
  %min.iters.check = icmp ult i32 %22, 4
  br i1 %min.iters.check, label %.lr.ph.preheader92, label %vector.ph

.lr.ph.preheader92:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 4294967292
  %broadcast.splatinsert = insertelement <2 x double> poison, double %1, 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 ]
  %36 = getelementptr inbounds double, ptr %27, i64 %index
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %wide.load = load <2 x double>, ptr %36, align 8, !tbaa !5
  %wide.load75 = load <2 x double>, ptr %37, align 8, !tbaa !5
  %38 = fadd <2 x double> %wide.load, %broadcast.splat
  %39 = fadd <2 x double> %wide.load75, %broadcast.splat
  store <2 x double> %38, ptr %36, align 8, !tbaa !5
  store <2 x double> %39, ptr %37, align 8, !tbaa !5
  %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 !9

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

._crit_edge:                                      ; preds = %.lr.ph, %middle.block
  tail call void @_ZN4sptk5world8interp1QEddPKdiS2_iPd(double noundef %34, double noundef %35, ptr noundef nonnull %21, i32 noundef %15, ptr noundef nonnull %27, i32 noundef %22, ptr noundef nonnull %29)
  br i1 %.not62, label %._crit_edge68, label %.lr.ph67.preheader

.lr.ph67.preheader:                               ; preds = %._crit_edge
  %wide.trip.count73 = zext i32 %22 to i64
  %min.iters.check78 = icmp ult i32 %22, 2
  br i1 %min.iters.check78, label %.lr.ph67.preheader91, label %vector.ph79

.lr.ph67.preheader91:                             ; preds = %middle.block76, %.lr.ph67.preheader
  %indvars.iv70.ph = phi i64 [ 0, %.lr.ph67.preheader ], [ %n.vec81, %middle.block76 ]
  br label %.lr.ph67

vector.ph79:                                      ; preds = %.lr.ph67.preheader
  %n.vec81 = and i64 %wide.trip.count, 4294967294
  %broadcast.splatinsert87 = insertelement <2 x double> poison, double %1, i64 0
  %broadcast.splat88 = shufflevector <2 x double> %broadcast.splatinsert87, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body83

vector.body83:                                    ; preds = %vector.body83, %vector.ph79
  %index84 = phi i64 [ 0, %vector.ph79 ], [ %index.next89, %vector.body83 ]
  %41 = getelementptr inbounds double, ptr %29, i64 %index84
  %wide.load85 = load <2 x double>, ptr %41, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %28, i64 %index84
  %wide.load86 = load <2 x double>, ptr %42, align 8, !tbaa !5
  %43 = fsub <2 x double> %wide.load85, %wide.load86
  %44 = fdiv <2 x double> %43, %broadcast.splat88
  %45 = getelementptr inbounds double, ptr %4, i64 %index84
  store <2 x double> %44, ptr %45, align 8, !tbaa !5
  %index.next89 = add nuw i64 %index84, 2
  %46 = icmp eq i64 %index.next89, %n.vec81
  br i1 %46, label %middle.block76, label %vector.body83, !llvm.loop !13

middle.block76:                                   ; preds = %vector.body83
  %cmp.n90 = icmp eq i64 %n.vec81, %wide.trip.count
  br i1 %cmp.n90, label %._crit_edge68, label %.lr.ph67.preheader91

.lr.ph:                                           ; preds = %.lr.ph.preheader92, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader92 ]
  %47 = getelementptr inbounds double, ptr %27, i64 %indvars.iv
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = fadd double %48, %1
  store double %49, ptr %47, align 8, !tbaa !5
  %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 !14

.lr.ph67:                                         ; preds = %.lr.ph67.preheader91, %.lr.ph67
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph67 ], [ %indvars.iv70.ph, %.lr.ph67.preheader91 ]
  %50 = getelementptr inbounds double, ptr %29, i64 %indvars.iv70
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %28, i64 %indvars.iv70
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = fsub double %51, %53
  %55 = fdiv double %54, %1
  %56 = getelementptr inbounds double, ptr %4, i64 %indvars.iv70
  store double %55, ptr %56, align 8, !tbaa !5
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %._crit_edge68, label %.lr.ph67, !llvm.loop !15

._crit_edge68:                                    ; preds = %.lr.ph67, %middle.block76, %._crit_edge.thread, %._crit_edge
  tail call void @_ZdaPv(ptr noundef nonnull %20) #6
  tail call void @_ZdaPv(ptr noundef nonnull %21) #6
  tail call void @_ZdaPv(ptr noundef nonnull %27) #6
  tail call void @_ZdaPv(ptr noundef nonnull %28) #6
  tail call void @_ZdaPv(ptr noundef nonnull %29) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN4sptk5world12_GLOBAL__N_131SetParametersForLinearSmoothingEiiidPKdPdS4_S4_(i32 noundef, i32 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { nobuiltin 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 #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 = { nobuiltin 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 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 = { mustprogress 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 #5 = { builtin allocsize(0) }
attributes #6 = { builtin 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 = 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, !11, !12}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10, !12, !11}


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