	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gray_frame
_gray_frame:                            ## @gray_frame
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	32(%rdi), %edi
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	callq	_av_pix_fmt_get_chroma_sub_sample
	movl	(%r14), %edi
	testl	%edi, %edi
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	movq	8(%r14), %rcx
	movslq	(%rcx), %rdi
	movslq	%ebx, %rbx
	imulq	%rbx, %rdi
	addq	(%rax), %rdi
	movl	16(%r14), %edx
	movl	$128, %esi
	callq	_memset
	incl	%ebx
	movl	(%r14), %edi
	cmpl	%edi, %ebx
	jl	LBB0_2
LBB0_3:
	movl	-28(%rbp), %esi
	callq	_AV_CEIL_RSHIFT
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	movq	8(%r14), %rcx
	movslq	4(%rcx), %r15
	movslq	%ebx, %rbx
	imulq	%rbx, %r15
	addq	8(%rax), %r15
	movl	16(%r14), %edi
	movl	-32(%rbp), %esi
	callq	_AV_CEIL_RSHIFT
	movq	%r15, %rdi
	movl	$128, %esi
	movl	%eax, %edx
	callq	_memset
	movq	24(%r14), %rax
	movq	8(%r14), %rcx
	movslq	8(%rcx), %r15
	imulq	%rbx, %r15
	addq	16(%rax), %r15
	movl	16(%r14), %edi
	movl	-32(%rbp), %esi
	callq	_AV_CEIL_RSHIFT
	movq	%r15, %rdi
	movl	$128, %esi
	movl	%eax, %edx
	callq	_memset
	incl	%ebx
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	callq	_AV_CEIL_RSHIFT
	cmpl	%eax, %ebx
	jl	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gray_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gray_frame
_gray_frame:                            ; @gray_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w0, [x0, #32]
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_av_pix_fmt_get_chroma_sub_sample
	ldr	w0, [x19]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldrsw	x9, [x9]
	sxtw	x10, w20
	madd	x0, x9, x10, x8
	ldr	w2, [x19, #16]
	mov	w1, #128
	bl	_memset
	add	w20, w20, #1
	ldr	w0, [x19]
	cmp	w20, w0
	b.lt	LBB0_2
LBB0_3:
	ldr	w1, [sp, #8]
	bl	_AV_CEIL_RSHIFT
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	ldr	x9, [x19, #8]
	ldrsw	x9, [x9, #4]
	sxtw	x22, w21
	madd	x20, x9, x22, x8
	ldr	w0, [x19, #16]
	ldr	w1, [sp, #12]
	bl	_AV_CEIL_RSHIFT
	mov	x2, x0
	mov	x0, x20
	mov	w1, #128
	bl	_memset
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #16]
	ldr	x9, [x19, #8]
	ldrsw	x9, [x9, #8]
	madd	x20, x9, x22, x8
	ldr	w0, [x19, #16]
	ldr	w1, [sp, #12]
	bl	_AV_CEIL_RSHIFT
	mov	x2, x0
	mov	x0, x20
	mov	w1, #128
	bl	_memset
	add	w21, w21, #1
	ldr	w0, [x19]
	ldr	w1, [sp, #8]
	bl	_AV_CEIL_RSHIFT
	cmp	w21, w0
	b.lt	LBB0_5
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gray_frame
.subsections_via_symbols
