	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grayscale_filter
_grayscale_filter:                      ## @grayscale_filter
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_12
## %bb.1:
	movq	8(%rdi), %rcx
	cmpl	$4, %r9d
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	jmp	LBB0_11
LBB0_3:
	movl	%r9d, %edx
	andl	$-4, %edx
	movq	%rsi, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	leaq	-4(%rdx), %rax
	movq	%rax, %r10
	shrq	$2, %r10
	incq	%r10
	movl	%r10d, %r8d
	andl	$7, %r8d
	cmpq	$28, %rax
	jae	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	andq	$-8, %r10
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rcx,%rax,8)
	movdqu	%xmm0, 16(%rcx,%rax,8)
	movdqu	%xmm0, 32(%rcx,%rax,8)
	movdqu	%xmm0, 48(%rcx,%rax,8)
	movdqu	%xmm0, 64(%rcx,%rax,8)
	movdqu	%xmm0, 80(%rcx,%rax,8)
	movdqu	%xmm0, 96(%rcx,%rax,8)
	movdqu	%xmm0, 112(%rcx,%rax,8)
	movdqu	%xmm0, 128(%rcx,%rax,8)
	movdqu	%xmm0, 144(%rcx,%rax,8)
	movdqu	%xmm0, 160(%rcx,%rax,8)
	movdqu	%xmm0, 176(%rcx,%rax,8)
	movdqu	%xmm0, 192(%rcx,%rax,8)
	movdqu	%xmm0, 208(%rcx,%rax,8)
	movdqu	%xmm0, 224(%rcx,%rax,8)
	movdqu	%xmm0, 240(%rcx,%rax,8)
	addq	$32, %rax
	addq	$-8, %r10
	jne	LBB0_6
LBB0_7:
	testq	%r8, %r8
	je	LBB0_10
## %bb.8:
	leaq	(%rcx,%rax,8), %r10
	addq	$16, %r10
	shlq	$5, %r8
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, -16(%r10,%rax)
	movdqu	%xmm0, (%r10,%rax)
	addq	$32, %rax
	cmpq	%rax, %r8
	jne	LBB0_9
LBB0_10:
	cmpq	%r9, %rdx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, (%rcx,%rdx,8)
	incq	%rdx
	cmpq	%rdx, %r9
	jne	LBB0_11
LBB0_12:
	addq	$4, %rdi
	popq	%rbp
	jmp	_taskset_cycle                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_grayscale_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grayscale_filter
_grayscale_filter:                      ; @grayscale_filter
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	x9, [x0, #8]
	cmp	w8, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x10, #0
	b	LBB0_6
LBB0_3:
	and	x10, x8, #0xfffffff8
	dup.2d	v0, x1
	add	x11, x9, #32
	mov	x12, x10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #8
	b.ne	LBB0_4
; %bb.5:
	cmp	x10, x8
	b.eq	LBB0_8
LBB0_6:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	x1, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
	add	x0, x0, #4
	b	_taskset_cycle
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_grayscale_filter
.subsections_via_symbols
