	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lum_planar_vscale
_lum_planar_vscale:                     ## @lum_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	24(%rsi), %r14
	movl	$1, %edi
	subl	(%r14), %edi
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	32(%r14), %rax
	movslq	%edx, %r12
	movl	(%rax,%r12,4), %esi
	callq	_FFMAX
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdx
	movq	(%rdx), %rsi
	movslq	(%rsi), %rdi
	movslq	%eax, %r13
	movq	%r13, %rdx
	subq	%rdi, %rdx
	movq	8(%rcx), %rcx
	movslq	(%rcx), %rdi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	shlq	$3, %rdx
	addq	8(%rsi), %rdx
	subq	%rdi, %r12
	movq	8(%rcx), %r8
	movl	(%r14), %esi
	cmpl	$1, %esi
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	jne	LBB0_2
## %bb.1:
	movq	(%rdx), %rdi
	movq	(%r8,%r12,8), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	callq	*8(%r14)
	cmpq	$0, 16(%rbx)
	jne	LBB0_4
	jmp	LBB0_7
LBB0_2:
	movl	%esi, %ecx
	imull	%r15d, %ecx
	xorl	%edi, %edi
	cmpq	$0, 16(%r14)
	movslq	%ecx, %rcx
	cmoveq	%rcx, %rdi
	movq	24(%r14), %rcx
	shlq	$2, %rdi
	addq	(%rcx), %rdi
	movq	(%r8,%r12,8), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r9d
	movl	$0, (%rsp)
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	*8(%r14)
	cmpq	$0, 16(%rbx)
	je	LBB0_7
LBB0_4:
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	movslq	48(%rcx), %rdx
	subq	%rdx, %r13
	movq	8(%rax), %rax
	movslq	48(%rax), %rdx
	shlq	$3, %r13
	addq	56(%rcx), %r13
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	subq	%rdx, %rcx
	movq	%rcx, %rdx
	movq	56(%rax), %rax
	movl	(%r14), %esi
	cmpl	$1, %esi
	jne	LBB0_6
## %bb.5:
	movq	(%r13), %rdi
	movq	(%rax,%rdx,8), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	callq	*8(%r14)
	jmp	LBB0_7
LBB0_6:
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	imull	%esi, %ecx
	xorl	%edi, %edi
	cmpq	$0, 16(%r14)
	movslq	%ecx, %rcx
	cmoveq	%rcx, %rdi
	movq	24(%r14), %rcx
	shlq	$2, %rdi
	addq	8(%rcx), %rdi
	movq	(%rax,%rdx,8), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r9d
	movl	$0, (%rsp)
	movq	%r13, %rdx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	*8(%r14)
LBB0_7:
	movl	$1, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lum_planar_vscale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lum_planar_vscale
_lum_planar_vscale:                     ; @lum_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
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x24, [x1, #24]
	ldr	x8, [x1]
	ldr	w19, [x8]
	ldr	w8, [x24]
	mov	w9, #1
	sub	w0, w9, w8
	ldr	x8, [x24, #32]
	mov	x9, x2
	sxtw	x25, w9
	ldr	w1, [x8, w2, sxtw #2]
	bl	_FFMAX
	mov	x23, x0
	ldp	x9, x8, [x22]
	ldr	x10, [x8]
	ldr	w8, [x10]
	sub	w11, w0, w8
	ldr	x9, [x9, #8]
	ldrsw	x8, [x9]
	sub	x8, x25, x8
	ldr	x10, [x10, #8]
	add	x2, x10, w11, sxtw #3
	ldr	x9, [x9, #8]
	ldr	w1, [x24]
	cmp	w1, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	x10, [x24, #8]
	ldr	x0, [x2]
	ldr	x1, [x9, x8, lsl #3]
	ldr	w3, [x20]
	mov	x2, x19
	mov	w4, #0
	blr	x10
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_3
	b	LBB0_6
LBB0_2:
	mul	w10, w1, w21
	sxtw	x10, w10
	ldp	x12, x11, [x24, #8]
	cmp	x11, #0
	csel	x10, x10, xzr, eq
	ldr	x11, [x24, #24]
	ldr	x11, [x11]
	add	x0, x11, x10, lsl #2
	ldr	x3, [x9, x8, lsl #3]
	ldr	w5, [x20]
	mov	x4, x19
	mov	w6, #0
	blr	x12
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_6
LBB0_3:
	ldp	x9, x8, [x22]
	ldr	x10, [x8]
	ldr	w8, [x10, #48]
	sub	w11, w23, w8
	ldr	x9, [x9, #8]
	ldrsw	x8, [x9, #48]
	sxtw	x12, w21
	sub	x8, x12, x8
	ldr	x10, [x10, #56]
	add	x2, x10, w11, sxtw #3
	ldr	x9, [x9, #56]
	ldr	w1, [x24]
	cmp	w1, #1
	b.ne	LBB0_5
; %bb.4:
	ldr	x10, [x24, #8]
	ldr	x0, [x2]
	ldr	x1, [x9, x8, lsl #3]
	ldr	w3, [x20]
	mov	x2, x19
	mov	w4, #0
	blr	x10
	b	LBB0_6
LBB0_5:
	mul	w10, w1, w21
	sxtw	x10, w10
	ldp	x12, x11, [x24, #8]
	cmp	x11, #0
	csel	x10, x10, xzr, eq
	ldr	x11, [x24, #24]
	ldr	x11, [x11, #8]
	add	x0, x11, x10, lsl #2
	ldr	x3, [x9, x8, lsl #3]
	ldr	w5, [x20]
	mov	x4, x19
	mov	w6, #0
	blr	x12
LBB0_6:
	mov	w0, #1
	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	_lum_planar_vscale
.subsections_via_symbols
