	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mediacodec_sw_buffer_copy_yuv420_planar ## -- Begin function ff_mediacodec_sw_buffer_copy_yuv420_planar
	.p2align	4, 0x90
_ff_mediacodec_sw_buffer_copy_yuv420_planar: ## @ff_mediacodec_sw_buffer_copy_yuv420_planar
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%r8d, %r8d
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r14d
	movl	%eax, %ebx
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	imull	%ebx, %r14d
	movq	8(%r9), %rax
	movq	(%rax,%r8,8), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%r8
	cmpq	$3, %r8
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_14
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movl	(%rsi), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rcx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %ebx
	testq	%r8, %r8
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r14d
	shrl	$31, %r14d
	addl	%ebx, %r14d
	leal	1(%rax), %edx
	shrl	$31, %edx
	leal	(%rax,%rdx), %ebx
	incl	%ebx
	sarl	%ebx
	movl	12(%rsi), %edx
	imull	%edx, %eax
	cltq
	leaq	(%rcx,%rax,4), %rax
	cmpq	$2, %r8
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%edx, %ecx
	incl	%ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	incl	%ecx
	sarl	%ecx
	imull	%ebx, %ecx
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,4), %rax
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	sarl	%r14d
	movslq	4(%rsi), %rcx
	movslq	%ebx, %rdx
	imulq	%rdx, %rcx
	leaq	(%rax,%rcx,4), %rax
	movl	8(%rsi), %ecx
	movl	%ecx, %esi
	shrl	$31, %esi
	addl	%ecx, %esi
	sarl	%esi
	movslq	%esi, %rcx
	leaq	(%rax,%rcx,4), %r15
	movq	(%r9), %rax
	movl	(%rax,%r8,4), %r12d
	cmpl	%edx, %r12d
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r9), %rax
	movq	(%rax,%r8,8), %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movl	$2, %esi
	callq	_FFALIGN
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movl	%r12d, %edi
	callq	_FFMIN
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movl	%eax, %r12d
	movl	%ebx, %eax
	movl	%r14d, %ebx
	testl	%ebx, %ebx
	jg	LBB0_11
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%eax, %rdx
	movslq	4(%rsi), %rdi
	imulq	%rdx, %rdi
	leaq	(%rcx,%rdi,4), %rcx
	movslq	8(%rsi), %rdx
	leaq	(%rcx,%rdx,4), %r15
	movq	(%r9), %rcx
	cmpl	%eax, (%rcx)
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r9), %rcx
	movq	(%rcx), %r13
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %r12d
	testl	%ebx, %ebx
	jle	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movslq	%eax, %r14
	shlq	$2, %r14
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	(%r9), %rax
	movslq	(%rax,%r8,4), %rax
	leaq	(%r13,%rax,4), %r13
	addq	%r14, %r15
	decl	%ebx
	jne	LBB0_12
	jmp	LBB0_13
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mediacodec_sw_buffer_copy_yuv420_planar ; -- Begin function ff_mediacodec_sw_buffer_copy_yuv420_planar
	.p2align	2
_ff_mediacodec_sw_buffer_copy_yuv420_planar: ; @ff_mediacodec_sw_buffer_copy_yuv420_planar
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	str	x4, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	x27, #0
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x8
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x27, lsl #3]
	mul	w2, w20, w28
	mov	x1, x24
	bl	_memcpy
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	cmp	x27, #3
	b.eq	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w8, [x22]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldrsw	x9, [x9]
	add	x9, x21, x9, lsl #2
	ldr	w28, [x23]
	cbz	x27, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w28, #0
	cinc	w10, w28, lt
	asr	w28, w10, #1
	add	w10, w8, #1
	add	w11, w8, #2
	cmp	w10, #0
	csinc	w10, w11, w8, lt
	asr	w20, w10, #1
	ldr	w10, [x22, #12]
	mul	w8, w10, w8
	add	x8, x9, w8, sxtw #2
	add	w9, w10, #1
	add	w11, w10, #2
	cmp	w9, #0
	csinc	w9, w11, w10, lt
	asr	w9, w9, #1
	mul	w9, w9, w20
	add	x9, x8, w9, sxtw #2
	cmp	x27, #2
	csel	x8, x8, x9, ne
	ldp	w9, w10, [x22, #4]
	mul	w9, w9, w20
	add	x8, x8, w9, sxtw #2
	cmp	w10, #0
	cinc	w9, w10, lt
	asr	w9, w9, #1
	add	x24, x8, w9, sxtw #2
	ldr	x8, [x19]
	ldr	w26, [x8, x27, lsl #2]
	cmp	w26, w20
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x25, [x8, x27, lsl #3]
	ldr	w0, [x23, #4]
	mov	w1, #2
	bl	_FFALIGN
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w1, w8, #1
	mov	x0, x26
	bl	_FFMIN
	mov	x26, x0
	mov	x8, x20
	cmp	w28, #1
	b.ge	LBB0_9
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	w10, w11, [x22, #4]
                                        ; kill: def $w11 killed $w11 def $x11
	sxtw	x11, w11
	mul	w10, w10, w8
	add	x9, x9, w10, sxtw #2
	add	x24, x9, x11, lsl #2
	ldr	x9, [x19]
	ldr	w9, [x9]
	cmp	w9, w8
	b.eq	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #8]
	ldr	x25, [x9]
	ldr	w26, [x23, #4]
	cmp	w28, #1
	b.lt	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	sbfiz	x20, x8, #2, #32
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x25
	mov	x1, x24
	mov	x2, x26
	bl	_memcpy
	ldr	x8, [x19]
	ldrsw	x8, [x8, x27, lsl #2]
	add	x25, x25, x8, lsl #2
	add	x24, x24, x20
	subs	w28, w28, #1
	b.ne	LBB0_10
	b	LBB0_3
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
