	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chr_planar_vscale
_chr_planar_vscale:                     ## @chr_planar_vscale
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rsi), %rbx
	movb	(%rbx), %cl
	movl	$-1, %esi
	shll	%cl, %esi
	notl	%esi
	xorl	%eax, %eax
	testl	%edx, %esi
	jne	LBB0_13
## %bb.1:
	movl	%edx, %r14d
	movq	%rdi, %r15
	movq	16(%r12), %r13
	movl	16(%rbx), %esi
	movl	20(%rbx), %edi
	callq	_AV_CEIL_RSHIFT
	movq	(%r12), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r14d
	movl	$1, %edi
	subl	(%r13), %edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	32(%r13), %rax
	movslq	%r14d, %r14
	movl	(%rax,%r14,4), %esi
	callq	_FFMAX
	movq	(%r12), %rsi
	movq	8(%r12), %rcx
	movq	(%rcx), %rdx
	movslq	16(%rdx), %rdi
	movslq	%eax, %rbx
	movq	%rbx, %rcx
	subq	%rdi, %rcx
	movslq	32(%rdx), %rax
	subq	%rax, %rbx
	movq	8(%rsi), %rsi
	movslq	16(%rsi), %r8
	shlq	$3, %rcx
	shlq	$3, %rbx
	movq	24(%r13), %rax
	movq	(%rax), %r9
	cmpq	$0, 8(%r13)
	je	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	jmp	LBB0_4
LBB0_3:
	movslq	(%r13), %rdi
	imulq	%r14, %rdi
LBB0_4:
	movq	%r14, %rax
	subq	%r8, %rax
	addq	24(%rdx), %rcx
	movq	24(%rsi), %r8
	leaq	(%r9,%rdi,4), %r12
	addq	40(%rdx), %rbx
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.5:
	movl	(%r13), %edx
	movq	(%r8,%rax,8), %r9
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %r8
	callq	*16(%r13)
	jmp	LBB0_12
LBB0_6:
	movslq	32(%rsi), %rdx
	subq	%rdx, %r14
	movq	40(%rsi), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %esi
	movq	16(%r13), %r10
	cmpl	$1, %esi
	jne	LBB0_8
## %bb.7:
	movq	(%rcx), %rdi
	movq	(%r8,%rax,8), %rsi
	movl	4(%r15), %ecx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	xorl	%r8d, %r8d
	callq	*%r10
	movq	(%rbx), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rsi
	movl	4(%r15), %ecx
	movl	%r12d, %edx
	movl	$3, %r8d
	callq	*16(%r13)
	jmp	LBB0_12
LBB0_8:
	movq	(%r8,%rax,8), %rax
	movl	4(%r15), %r9d
	movl	$0, (%rsp)
	movq	%r12, %rdi
	movq	%rcx, %rdx
	movq	%rax, %rcx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	*%r10
	movq	16(%r13), %rax
	movl	(%r13), %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%r14,8), %rcx
	movl	4(%r15), %r9d
	cmpq	$0, 8(%r13)
	je	LBB0_9
## %bb.10:
	movl	(%r15), %edx
	sarl	%edx
	jmp	LBB0_11
LBB0_9:
	movl	$3, %edx
LBB0_11:
	movl	%edx, (%rsp)
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	*%rax
LBB0_12:
	movl	$1, %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_chr_planar_vscale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chr_planar_vscale
_chr_planar_vscale:                     ; @chr_planar_vscale
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x1]
	ldr	w9, [x8]
	mov	w10, #-1
	lsl	w9, w10, w9
	bics	wzr, w2, w9
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_14
LBB0_2:
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x23, [x1, #16]
	ldp	w1, w0, [x8, #16]
	bl	_AV_CEIL_RSHIFT
	mov	x19, x0
	ldr	x8, [x21]
	ldr	w8, [x8]
	asr	w22, w22, w8
	ldr	w8, [x23]
	mov	w9, #1
	sub	w0, w9, w8
	ldr	x8, [x23, #32]
	sxtw	x24, w22
	ldr	w1, [x8, w22, sxtw #2]
	bl	_FFMAX
	ldp	x9, x8, [x21]
	ldr	x8, [x8]
	ldr	w10, [x8, #16]
	sub	w11, w0, w10
	ldr	w10, [x8, #32]
	sub	w12, w0, w10
	ldr	x9, [x9, #8]
	ldrsw	x10, [x9, #16]
	ldr	x15, [x8, #24]
	ldr	x14, [x8, #40]
	ldr	x8, [x9, #24]
	ldr	x13, [x23, #24]
	ldr	x13, [x13]
	ldr	x16, [x23, #8]
	cbz	x16, LBB0_4
; %bb.3:
	mov	x16, #0
	b	LBB0_5
LBB0_4:
	ldrsw	x16, [x23]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	sxtw	x17, w22
	mul	x16, x16, x17
LBB0_5:
	sub	x10, x24, x10
	add	x3, x15, w11, sxtw #3
	add	x21, x14, w12, sxtw #3
	ldr	x11, [x20, #8]
	add	x22, x13, x16, lsl #2
	cbz	x11, LBB0_7
; %bb.6:
	ldr	x9, [x23, #16]
	ldr	w2, [x23]
	ldr	x5, [x8, x10, lsl #3]
	mov	x0, x20
	mov	x1, x22
	mov	x4, x21
	mov	x6, x19
	blr	x9
	b	LBB0_13
LBB0_7:
	ldrsw	x11, [x9, #32]
	ldr	x25, [x9, #40]
	sub	x24, x24, x11
	ldr	w1, [x23]
	ldr	x9, [x23, #16]
	cmp	w1, #1
	b.ne	LBB0_9
; %bb.8:
	ldr	x0, [x3]
	ldr	x1, [x8, x10, lsl #3]
	ldr	w3, [x20, #4]
	mov	x2, x19
	mov	w4, #0
	blr	x9
	ldr	x8, [x23, #16]
	ldr	x0, [x21]
	ldr	x1, [x25, x24, lsl #3]
	ldr	w3, [x20, #4]
	mov	x2, x19
	mov	w4, #3
	blr	x8
	b	LBB0_13
LBB0_9:
	ldr	x8, [x8, x10, lsl #3]
	ldr	w5, [x20, #4]
	mov	x0, x22
	mov	x2, x3
	mov	x3, x8
	mov	x4, x19
	mov	w6, #0
	blr	x9
	ldr	w1, [x23]
	ldr	x3, [x25, x24, lsl #3]
	ldr	w5, [x20, #4]
	ldp	x9, x8, [x23, #8]
	cbz	x9, LBB0_11
; %bb.10:
	ldr	w9, [x20]
	asr	w6, w9, #1
	b	LBB0_12
LBB0_11:
	mov	w6, #3
LBB0_12:
	mov	x0, x22
	mov	x2, x21
	mov	x4, x19
	blr	x8
LBB0_13:
	mov	w0, #1
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_chr_planar_vscale
.subsections_via_symbols
