; LLVM IR from ermig1979/Simd :: src/Simd/SimdBaseResizerBilinear.ll (ZN4Simd4Base19ResizerBf16Bilinear3RunEPKtmPtm)

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

%"class.Simd::Resizer" = type { %"struct.Simd::Deletable", %"struct.Simd::ResParam" }
%"struct.Simd::Deletable" = type { ptr }
%"struct.Simd::ResParam" = type { i32, i32, i64, i64, i64, i64, i64, i64 }
%"class.Simd::Base::ResizerBf16Bilinear" = type { %"class.Simd::Resizer", i8, %"struct.Simd::Array", %"struct.Simd::Array", %"struct.Simd::Array.0", %"struct.Simd::Array.0", [2 x %"struct.Simd::Array.0"] }
%"struct.Simd::Array" = type { ptr, i64 }
%"struct.Simd::Array.0" = type { ptr, i64 }

; 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 float @llvm.fmuladd.f32(float, float, float) #1

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIiEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIfEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4SwapIPfEEvRT_S3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base19ResizerBf16Bilinear3RunEPKtmPtm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4) unnamed_addr #3 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca [2 x ptr], align 16
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca float, align 4
  %26 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i64 %4, ptr %10, align 8, !tbaa !9
  %27 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %28 = getelementptr inbounds %"class.Simd::Resizer", ptr %27, i32 0, i32 1
  %29 = getelementptr inbounds %"struct.Simd::ResParam", ptr %28, i32 0, i32 6
  %30 = load i64, ptr %29, align 8, !tbaa !11
  store i64 %30, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %31 = getelementptr inbounds %"class.Simd::Resizer", ptr %27, i32 0, i32 1
  %32 = getelementptr inbounds %"struct.Simd::ResParam", ptr %31, i32 0, i32 4
  %33 = load i64, ptr %32, align 8, !tbaa !17
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = mul i64 %33, %34
  store i64 %35, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %36 = getelementptr inbounds %"class.Simd::Base::ResizerBf16Bilinear", ptr %27, i32 0, i32 6
  %37 = getelementptr inbounds [2 x %"struct.Simd::Array.0"], ptr %36, i64 0, i64 0
  %38 = getelementptr inbounds %"struct.Simd::Array.0", ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !18
  store ptr %39, ptr %13, align 8, !tbaa !5
  %40 = getelementptr inbounds ptr, ptr %13, i64 1
  %41 = getelementptr inbounds %"class.Simd::Base::ResizerBf16Bilinear", ptr %27, i32 0, i32 6
  %42 = getelementptr inbounds [2 x %"struct.Simd::Array.0"], ptr %41, i64 0, i64 1
  %43 = getelementptr inbounds %"struct.Simd::Array.0", ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  store ptr %44, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 -2, ptr %14, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %166, %5
  %46 = load i64, ptr %15, align 8, !tbaa !9
  %47 = getelementptr inbounds %"class.Simd::Resizer", ptr %27, i32 0, i32 1
  %48 = getelementptr inbounds %"struct.Simd::ResParam", ptr %47, i32 0, i32 5
  %49 = load i64, ptr %48, align 8, !tbaa !22
  %50 = icmp ult i64 %46, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %45
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %172

52:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %53 = getelementptr inbounds %"class.Simd::Base::ResizerBf16Bilinear", ptr %27, i32 0, i32 5
  %54 = load i64, ptr %15, align 8, !tbaa !9
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIfEixEm(ptr noundef nonnull align 8 dereferenceable(16) %53, i64 noundef %54)
  %56 = load float, ptr %55, align 4, !tbaa !23
  store float %56, ptr %17, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %57 = load float, ptr %17, align 4, !tbaa !23
  %58 = fsub float 1.000000e+00, %57
  store float %58, ptr %18, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %59 = getelementptr inbounds %"class.Simd::Base::ResizerBf16Bilinear", ptr %27, i32 0, i32 3
  %60 = load i64, ptr %15, align 8, !tbaa !9
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIiEixEm(ptr noundef nonnull align 8 dereferenceable(16) %59, i64 noundef %60)
  %62 = load i32, ptr %61, align 4, !tbaa !20
  store i32 %62, ptr %19, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !20
  %63 = load i32, ptr %19, align 4, !tbaa !20
  %64 = load i32, ptr %14, align 4, !tbaa !20
  %65 = icmp eq i32 %63, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %52
  store i32 2, ptr %20, align 4, !tbaa !20
  br label %76

67:                                               ; preds = %52
  %68 = load i32, ptr %19, align 4, !tbaa !20
  %69 = load i32, ptr %14, align 4, !tbaa !20
  %70 = add nsw i32 %69, 1
  %71 = icmp eq i32 %68, %70
  br i1 %71, label %72, label %75

72:                                               ; preds = %67
  %73 = getelementptr inbounds [2 x ptr], ptr %13, i64 0, i64 0
  %74 = getelementptr inbounds [2 x ptr], ptr %13, i64 0, i64 1
  call void @_ZN4Simd4SwapIPfEEvRT_S3_(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %74)
  store i32 1, ptr %20, align 4, !tbaa !20
  br label %75

75:                                               ; preds = %72, %67
  br label %76

76:                                               ; preds = %75, %66
  %77 = load i32, ptr %19, align 4, !tbaa !20
  store i32 %77, ptr %14, align 4, !tbaa !20
  br label %78

78:                                               ; preds = %134, %76
  %79 = load i32, ptr %20, align 4, !tbaa !20
  %80 = icmp slt i32 %79, 2
  br i1 %80, label %81, label %137

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %82 = load i32, ptr %20, align 4, !tbaa !20
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [2 x ptr], ptr %13, i64 0, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  store ptr %85, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load i32, ptr %19, align 4, !tbaa !20
  %88 = load i32, ptr %20, align 4, !tbaa !20
  %89 = add nsw i32 %87, %88
  %90 = sext i32 %89 to i64
  %91 = load i64, ptr %8, align 8, !tbaa !9
  %92 = mul i64 %90, %91
  %93 = getelementptr inbounds i16, ptr %86, i64 %92
  store ptr %93, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 0, ptr %23, align 8, !tbaa !9
  br label %94

94:                                               ; preds = %130, %81
  %95 = load i64, ptr %23, align 8, !tbaa !9
  %96 = load i64, ptr %12, align 8, !tbaa !9
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %133

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %100 = getelementptr inbounds %"class.Simd::Base::ResizerBf16Bilinear", ptr %27, i32 0, i32 2
  %101 = load i64, ptr %23, align 8, !tbaa !9
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIiEixEm(ptr noundef nonnull align 8 dereferenceable(16) %100, i64 noundef %101)
  %103 = load i32, ptr %102, align 4, !tbaa !20
  store i32 %103, ptr %24, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %104 = getelementptr inbounds %"class.Simd::Base::ResizerBf16Bilinear", ptr %27, i32 0, i32 4
  %105 = load i64, ptr %23, align 8, !tbaa !9
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIfEixEm(ptr noundef nonnull align 8 dereferenceable(16) %104, i64 noundef %105)
  %107 = load float, ptr %106, align 4, !tbaa !23
  store float %107, ptr %25, align 4, !tbaa !23
  %108 = load ptr, ptr %22, align 8, !tbaa !5
  %109 = load i32, ptr %24, align 4, !tbaa !20
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i16, ptr %108, i64 %110
  %112 = load i16, ptr %111, align 2, !tbaa !25
  %113 = call noundef float @_ZN4Simd4Base17BFloat16ToFloat32Et(i16 noundef zeroext %112)
  %114 = load float, ptr %25, align 4, !tbaa !23
  %115 = fsub float 1.000000e+00, %114
  %116 = load ptr, ptr %22, align 8, !tbaa !5
  %117 = load i32, ptr %24, align 4, !tbaa !20
  %118 = sext i32 %117 to i64
  %119 = load i64, ptr %11, align 8, !tbaa !9
  %120 = add i64 %118, %119
  %121 = getelementptr inbounds i16, ptr %116, i64 %120
  %122 = load i16, ptr %121, align 2, !tbaa !25
  %123 = call noundef float @_ZN4Simd4Base17BFloat16ToFloat32Et(i16 noundef zeroext %122)
  %124 = load float, ptr %25, align 4, !tbaa !23
  %125 = fmul float %123, %124
  %126 = call float @llvm.fmuladd.f32(float %113, float %115, float %125)
  %127 = load ptr, ptr %21, align 8, !tbaa !5
  %128 = load i64, ptr %23, align 8, !tbaa !9
  %129 = getelementptr inbounds float, ptr %127, i64 %128
  store float %126, ptr %129, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %130

130:                                              ; preds = %99
  %131 = load i64, ptr %23, align 8, !tbaa !9
  %132 = add i64 %131, 1
  store i64 %132, ptr %23, align 8, !tbaa !9
  br label %94, !llvm.loop !27

133:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %20, align 4, !tbaa !20
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %20, align 4, !tbaa !20
  br label %78, !llvm.loop !29

137:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %138

138:                                              ; preds = %162, %137
  %139 = load i64, ptr %26, align 8, !tbaa !9
  %140 = load i64, ptr %12, align 8, !tbaa !9
  %141 = icmp ult i64 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %165

143:                                              ; preds = %138
  %144 = getelementptr inbounds [2 x ptr], ptr %13, i64 0, i64 0
  %145 = load ptr, ptr %144, align 16, !tbaa !5
  %146 = load i64, ptr %26, align 8, !tbaa !9
  %147 = getelementptr inbounds float, ptr %145, i64 %146
  %148 = load float, ptr %147, align 4, !tbaa !23
  %149 = load float, ptr %18, align 4, !tbaa !23
  %150 = getelementptr inbounds [2 x ptr], ptr %13, i64 0, i64 1
  %151 = load ptr, ptr %150, align 8, !tbaa !5
  %152 = load i64, ptr %26, align 8, !tbaa !9
  %153 = getelementptr inbounds float, ptr %151, i64 %152
  %154 = load float, ptr %153, align 4, !tbaa !23
  %155 = load float, ptr %17, align 4, !tbaa !23
  %156 = fmul float %154, %155
  %157 = call float @llvm.fmuladd.f32(float %148, float %149, float %156)
  %158 = call noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef %157)
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = load i64, ptr %26, align 8, !tbaa !9
  %161 = getelementptr inbounds i16, ptr %159, i64 %160
  store i16 %158, ptr %161, align 2, !tbaa !25
  br label %162

162:                                              ; preds = %143
  %163 = load i64, ptr %26, align 8, !tbaa !9
  %164 = add i64 %163, 1
  store i64 %164, ptr %26, align 8, !tbaa !9
  br label %138, !llvm.loop !30

165:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %166

166:                                              ; preds = %165
  %167 = load i64, ptr %15, align 8, !tbaa !9
  %168 = add i64 %167, 1
  store i64 %168, ptr %15, align 8, !tbaa !9
  %169 = load i64, ptr %10, align 8, !tbaa !9
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds i16, ptr %170, i64 %169
  store ptr %171, ptr %9, align 8, !tbaa !5
  br label %45, !llvm.loop !31

172:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret void
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN4Simd4Base17BFloat16ToFloat32Et(i16 noundef zeroext) #4

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { alwaysinline 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 #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 = { alwaysinline 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 48}
!12 = !{!"_ZTSN4Simd7ResizerE", !13, i64 0, !14, i64 8}
!13 = !{!"_ZTSN4Simd9DeletableE"}
!14 = !{!"_ZTSN4Simd8ResParamE", !15, i64 0, !16, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!15 = !{!"_ZTS21SimdResizeChannelType", !7, i64 0}
!16 = !{!"_ZTS20SimdResizeMethodType", !7, i64 0}
!17 = !{!12, !10, i64 32}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSN4Simd5ArrayIfEE", !6, i64 0, !10, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!12, !10, i64 40}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"short", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}


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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIiEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIfEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4SwapIPfEEvRT_S3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base19ResizerBf16Bilinear3RunEPKtmPtm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr nocapture noundef writeonly %3, i64 noundef %4) unnamed_addr #3 align 2 {
  %6 = alloca [2 x ptr], align 16
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = load i64, ptr %9, align 8, !tbaa !14
  %11 = mul i64 %10, %8
  %.fr70 = freeze i64 %11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %12 = getelementptr inbounds i8, ptr %0, i64 136
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  store ptr %13, ptr %6, align 16, !tbaa !18
  %14 = getelementptr inbounds i8, ptr %6, i64 8
  %15 = getelementptr inbounds i8, ptr %0, i64 152
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  store ptr %16, ptr %14, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = load i64, ptr %17, align 8, !tbaa !19
  %.not = icmp eq i64 %18, 0
  br i1 %.not, label %._crit_edge59, label %.lr.ph58

.lr.ph58:                                         ; preds = %5
  %19 = getelementptr inbounds i8, ptr %0, i64 120
  %20 = getelementptr inbounds i8, ptr %0, i64 88
  %.not71 = icmp eq i64 %.fr70, 0
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  %22 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %.not71, label %.lr.ph58.split.split, label %.lr.ph58.split.us

.lr.ph58.split.us:                                ; preds = %.lr.ph58, %._crit_edge.us61
  %.04356.us = phi ptr [ %34, %._crit_edge.us61 ], [ %3, %.lr.ph58 ]
  %.04455.us = phi i32 [ %27, %._crit_edge.us61 ], [ -2, %.lr.ph58 ]
  %.04654.us = phi i64 [ %33, %._crit_edge.us61 ], [ 0, %.lr.ph58 ]
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIfEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %.04654.us)
  %24 = load float, ptr %23, align 4, !tbaa !20
  %25 = fsub float 1.000000e+00, %24
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIiEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %.04654.us)
  %27 = load i32, ptr %26, align 4, !tbaa !22
  %.not75 = icmp eq i32 %27, %.04455.us
  br i1 %.not75, label %.lr.ph.us60.preheader, label %28

.lr.ph.us60.preheader:                            ; preds = %._crit_edge.us.us, %.lr.ph58.split.us
  br label %.lr.ph.us60

28:                                               ; preds = %.lr.ph58.split.us
  %29 = add nsw i32 %.04455.us, 1
  %30 = icmp eq i32 %27, %29
  br i1 %30, label %31, label %.lr.ph.us.us.preheader

31:                                               ; preds = %28
  call void @_ZN4Simd4SwapIPfEEvRT_S3_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %14)
  br label %.lr.ph.us.us.preheader

.lr.ph.us.us.preheader:                           ; preds = %31, %28
  %.047.us.ph = phi i64 [ 0, %28 ], [ 1, %31 ]
  %32 = sext i32 %27 to i64
  br label %.lr.ph.us.us

._crit_edge.us61:                                 ; preds = %.lr.ph.us60
  %33 = add nuw i64 %.04654.us, 1
  %34 = getelementptr inbounds i16, ptr %.04356.us, i64 %4
  %35 = load i64, ptr %17, align 8, !tbaa !19
  %36 = icmp ult i64 %33, %35
  br i1 %36, label %.lr.ph58.split.us, label %._crit_edge59, !llvm.loop !24

.lr.ph.us60:                                      ; preds = %.lr.ph.us60.preheader, %.lr.ph.us60
  %.053.us = phi i64 [ %47, %.lr.ph.us60 ], [ 0, %.lr.ph.us60.preheader ]
  %37 = load ptr, ptr %6, align 16, !tbaa !18
  %38 = getelementptr inbounds float, ptr %37, i64 %.053.us
  %39 = load float, ptr %38, align 4, !tbaa !20
  %40 = load ptr, ptr %14, align 8, !tbaa !18
  %41 = getelementptr inbounds float, ptr %40, i64 %.053.us
  %42 = load float, ptr %41, align 4, !tbaa !20
  %43 = fmul float %24, %42
  %44 = call float @llvm.fmuladd.f32(float %39, float %25, float %43)
  %45 = call noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef %44)
  %46 = getelementptr inbounds i16, ptr %.04356.us, i64 %.053.us
  store i16 %45, ptr %46, align 2, !tbaa !26
  %47 = add nuw i64 %.053.us, 1
  %exitcond79.not = icmp eq i64 %47, %.fr70
  br i1 %exitcond79.not, label %._crit_edge.us61, label %.lr.ph.us60, !llvm.loop !28

.lr.ph.us.us:                                     ; preds = %.lr.ph.us.us.preheader, %._crit_edge.us.us
  %indvars.iv = phi i64 [ %.047.us.ph, %.lr.ph.us.us.preheader ], [ 1, %._crit_edge.us.us ]
  %48 = getelementptr inbounds [2 x ptr], ptr %6, i64 0, i64 %indvars.iv
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  %50 = add nsw i64 %indvars.iv, %32
  %51 = mul i64 %50, %2
  %52 = getelementptr inbounds i16, ptr %1, i64 %51
  %53 = getelementptr i16, ptr %52, i64 %8
  br label %54

54:                                               ; preds = %54, %.lr.ph.us.us
  %.04549.us.us = phi i64 [ 0, %.lr.ph.us.us ], [ %70, %54 ]
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIiEixEm(ptr noundef nonnull align 8 dereferenceable(16) %21, i64 noundef %.04549.us.us)
  %56 = load i32, ptr %55, align 4, !tbaa !22
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIfEixEm(ptr noundef nonnull align 8 dereferenceable(16) %22, i64 noundef %.04549.us.us)
  %58 = load float, ptr %57, align 4, !tbaa !20
  %59 = sext i32 %56 to i64
  %60 = getelementptr inbounds i16, ptr %52, i64 %59
  %61 = load i16, ptr %60, align 2, !tbaa !26
  %62 = call noundef float @_ZN4Simd4Base17BFloat16ToFloat32Et(i16 noundef zeroext %61)
  %63 = fsub float 1.000000e+00, %58
  %64 = getelementptr i16, ptr %53, i64 %59
  %65 = load i16, ptr %64, align 2, !tbaa !26
  %66 = call noundef float @_ZN4Simd4Base17BFloat16ToFloat32Et(i16 noundef zeroext %65)
  %67 = fmul float %58, %66
  %68 = call float @llvm.fmuladd.f32(float %62, float %63, float %67)
  %69 = getelementptr inbounds float, ptr %49, i64 %.04549.us.us
  store float %68, ptr %69, align 4, !tbaa !20
  %70 = add nuw i64 %.04549.us.us, 1
  %exitcond.not = icmp eq i64 %70, %.fr70
  br i1 %exitcond.not, label %._crit_edge.us.us, label %54, !llvm.loop !29

._crit_edge.us.us:                                ; preds = %54
  %71 = icmp eq i64 %indvars.iv, 0
  br i1 %71, label %.lr.ph.us.us, label %.lr.ph.us60.preheader, !llvm.loop !30

._crit_edge59:                                    ; preds = %._crit_edge.us61, %.preheader, %5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  ret void

.lr.ph58.split.split:                             ; preds = %.lr.ph58, %.preheader
  %.04455 = phi i32 [ %74, %.preheader ], [ -2, %.lr.ph58 ]
  %.04654 = phi i64 [ %78, %.preheader ], [ 0, %.lr.ph58 ]
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIfEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %.04654)
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Simd5ArrayIiEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %.04654)
  %74 = load i32, ptr %73, align 4, !tbaa !22
  %.not73 = icmp ne i32 %74, %.04455
  %75 = add nsw i32 %.04455, 1
  %76 = icmp eq i32 %74, %75
  %or.cond = select i1 %.not73, i1 %76, i1 false
  br i1 %or.cond, label %77, label %.preheader

77:                                               ; preds = %.lr.ph58.split.split
  call void @_ZN4Simd4SwapIPfEEvRT_S3_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %14)
  br label %.preheader

.preheader:                                       ; preds = %77, %.lr.ph58.split.split
  %78 = add nuw i64 %.04654, 1
  %79 = load i64, ptr %17, align 8, !tbaa !19
  %80 = icmp ult i64 %78, %79
  br i1 %80, label %.lr.ph58.split.split, label %._crit_edge59, !llvm.loop !24
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN4Simd4Base17BFloat16ToFloat32Et(i16 noundef zeroext) local_unnamed_addr #4

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { alwaysinline 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 #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 = { alwaysinline 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 #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, !13, i64 48}
!6 = !{!"_ZTSN4Simd7ResizerE", !7, i64 0, !8, i64 8}
!7 = !{!"_ZTSN4Simd9DeletableE"}
!8 = !{!"_ZTSN4Simd8ResParamE", !9, i64 0, !12, i64 4, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48}
!9 = !{!"_ZTS21SimdResizeChannelType", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTS20SimdResizeMethodType", !10, i64 0}
!13 = !{!"long", !10, i64 0}
!14 = !{!6, !13, i64 32}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTSN4Simd5ArrayIfEE", !17, i64 0, !13, i64 8}
!17 = !{!"any pointer", !10, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!6, !13, i64 40}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !10, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"int", !10, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !27, i64 0}
!27 = !{!"short", !10, i64 0}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}


; Effective O3 passes: ADCEPass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass