	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function bw_expand
LCPI0_0:
	.long	16384                           ## 0x4000
	.long	16384                           ## 0x4000
	.long	16384                           ## 0x4000
	.long	16384                           ## 0x4000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_bw_expand:                             ## @bw_expand
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
	cmpl	$2, %ecx
	jl	LBB0_11
## %bb.1:
	movl	%ecx, %r9d
	leaq	-1(%r9), %r8
	movl	$1, %ecx
	cmpq	$8, %r8
	jb	LBB0_7
## %bb.2:
	leaq	4(%rdi), %r10
	movq	%r10, %rax
	subq	%rdx, %rax
	addq	$-4, %rax
	cmpq	$32, %rax
	jb	LBB0_7
## %bb.3:
	subq	%rsi, %r10
	addq	$-4, %r10
	cmpq	$32, %r10
	jb	LBB0_7
## %bb.4:
	movq	%r8, %r10
	andq	$-8, %r10
	leaq	1(%r10), %rcx
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [16384,16384,16384,16384]
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	4(%rdx,%rax,4), %xmm1
	movdqu	20(%rdx,%rax,4), %xmm2
	movdqu	4(%rsi,%rax,4), %xmm3
	pmulld	%xmm1, %xmm3
	movdqu	20(%rsi,%rax,4), %xmm1
	pmulld	%xmm2, %xmm1
	paddd	%xmm0, %xmm3
	paddd	%xmm0, %xmm1
	psrad	$15, %xmm3
	psrad	$15, %xmm1
	movdqu	%xmm3, 4(%rdi,%rax,4)
	movdqu	%xmm1, 20(%rdi,%rax,4)
	addq	$8, %rax
	cmpq	%rax, %r10
	jne	LBB0_5
## %bb.6:
	cmpq	%r10, %r8
	je	LBB0_11
LBB0_7:
	movq	%rcx, %r8
	notq	%r8
	testb	$1, %r9b
	jne	LBB0_9
## %bb.8:
	movl	(%rsi,%rcx,4), %eax
	imull	(%rdx,%rcx,4), %eax
	addl	$16384, %eax                    ## imm = 0x4000
	sarl	$15, %eax
	movl	%eax, (%rdi,%rcx,4)
	incq	%rcx
LBB0_9:
	addq	%r9, %r8
	je	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rcx,4), %eax
	imull	(%rdx,%rcx,4), %eax
	addl	$16384, %eax                    ## imm = 0x4000
	sarl	$15, %eax
	movl	%eax, (%rdi,%rcx,4)
	movl	4(%rsi,%rcx,4), %eax
	imull	4(%rdx,%rcx,4), %eax
	addl	$16384, %eax                    ## imm = 0x4000
	sarl	$15, %eax
	movl	%eax, 4(%rdi,%rcx,4)
	addq	$2, %rcx
	cmpq	%rcx, %r9
	jne	LBB0_10
LBB0_11:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bw_expand
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bw_expand
_bw_expand:                             ; @bw_expand
	.cfi_startproc
; %bb.0:
	ldr	w8, [x1]
	str	w8, [x0]
	cmp	w3, #2
	b.lt	LBB0_10
; %bb.1:
	mov	w8, w3
	sub	x10, x8, #1
	cmp	x10, #16
	b.hs	LBB0_3
; %bb.2:
	mov	w9, #1
	b	LBB0_8
LBB0_3:
	add	x11, x0, #4
	sub	x9, x11, x2
	sub	x12, x9, #4
	mov	w9, #1
	cmp	x12, #64
	b.lo	LBB0_8
; %bb.4:
	sub	x11, x11, x1
	sub	x11, x11, #4
	cmp	x11, #64
	b.lo	LBB0_8
; %bb.5:
	and	x11, x10, #0xfffffffffffffff0
	orr	x9, x11, #0x1
	add	x12, x0, #36
	add	x13, x2, #36
	add	x14, x1, #36
	mov	x15, x11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x13, #-32]
	ldp	q2, q3, [x13], #64
	ldp	q4, q5, [x14, #-32]
	ldp	q6, q7, [x14], #64
	movi.4s	v16, #64, lsl #8
	mla.4s	v16, v4, v0
	movi.4s	v0, #64, lsl #8
	mla.4s	v0, v5, v1
	movi.4s	v1, #64, lsl #8
	mla.4s	v1, v6, v2
	movi.4s	v2, #64, lsl #8
	mla.4s	v2, v7, v3
	sshr.4s	v3, v16, #15
	sshr.4s	v0, v0, #15
	sshr.4s	v1, v1, #15
	sshr.4s	v2, v2, #15
	stp	q3, q0, [x12, #-32]
	stp	q1, q2, [x12], #64
	subs	x15, x15, #16
	b.ne	LBB0_6
; %bb.7:
	cmp	x10, x11
	b.eq	LBB0_10
LBB0_8:
	lsl	x12, x9, #2
	add	x10, x0, x12
	add	x11, x1, x12
	add	x12, x2, x12
	sub	x8, x8, x9
	orr	w9, wzr, #0x4000
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12], #4
	ldr	w14, [x11], #4
	madd	w13, w14, w13, w9
	asr	w13, w13, #15
	str	w13, [x10], #4
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bw_expand
.subsections_via_symbols
