	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnxhd_10bit_dct_quantize
_dnxhd_10bit_dct_quantize:              ## @dnxhd_10bit_dct_quantize
	.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	%rdi, %rsi
	xorl	%eax, %eax
	cmpl	$4, %edx
	setge	%al
	movq	40(%rdi), %r13
	movq	(%rdi,%rax,8), %rax
	movslq	%ecx, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	*32(%rsi)
	movl	(%r12), %eax
	addl	$2, %eax
	sarl	$2, %eax
	movl	%eax, (%r12)
	xorl	%ebx, %ebx
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13,%r15,4), %r14
	movl	(%r12,%r14,4), %edi
	callq	_FF_SIGNBIT
	movl	(%r12,%r14,4), %edx
	xorl	%eax, %edx
	subl	%eax, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	imull	(%rcx,%r14,4), %edx
	movq	_DNX10BIT_QMAT_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarl	%cl, %edx
	movl	%edx, %ecx
	xorl	%eax, %ecx
	subl	%eax, %ecx
	movl	%ecx, (%r12,%r14,4)
	testl	%edx, %edx
	cmovnel	%r15d, %ebx
	incq	%r15
	cmpq	$64, %r15
	jne	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rax
	movq	_FF_IDCT_PERM_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movl	24(%rdx), %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	callq	_ff_block_permute
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DNX10BIT_QMAT_SHIFT,4,2        ## @DNX10BIT_QMAT_SHIFT
	.comm	_FF_IDCT_PERM_NONE,8,3          ## @FF_IDCT_PERM_NONE
	.no_dead_strip	_dnxhd_10bit_dct_quantize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dnxhd_10bit_dct_quantize
_dnxhd_10bit_dct_quantize:              ; @dnxhd_10bit_dct_quantize
	.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	x19, x1
	mov	x20, x0
	cmp	w2, #3
	cset	w8, gt
	ldr	x8, [x0, w8, uxtw #3]
	ldr	x23, [x8, w3, sxtw #3]
	ldp	x8, x21, [x0, #32]
	mov	x0, x1
	blr	x8
	mov	w22, #0
	ldr	w8, [x19]
	add	w8, w8, #2
	asr	w8, w8, #2
	str	w8, [x19]
	mov	w24, #1
Lloh0:
	adrp	x25, _DNX10BIT_QMAT_SHIFT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DNX10BIT_QMAT_SHIFT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x21, x24, lsl #2]
	lsl	x26, x8, #2
	ldr	w0, [x19, x26]
	bl	_FF_SIGNBIT
	ldr	w8, [x19, x26]
	eor	w8, w8, w0
	ldr	w9, [x23, x26]
	sub	w8, w8, w0
	mul	w8, w8, w9
	ldr	w9, [x25]
	asr	w8, w8, w9
	eor	w9, w8, w0
	sub	w9, w9, w0
	str	w9, [x19, x26]
	cmp	w8, #0
	csel	w22, w22, w24, eq
	add	x24, x24, #1
	cmp	x24, #64
	b.ne	LBB0_1
; %bb.2:
	ldr	x8, [x20, #16]
Lloh2:
	adrp	x9, _FF_IDCT_PERM_NONE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FF_IDCT_PERM_NONE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	ldr	w1, [x20, #24]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	bl	_ff_block_permute
LBB0_4:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_DNX10BIT_QMAT_SHIFT,4,2        ; @DNX10BIT_QMAT_SHIFT
	.comm	_FF_IDCT_PERM_NONE,8,3          ; @FF_IDCT_PERM_NONE
	.no_dead_strip	_dnxhd_10bit_dct_quantize
.subsections_via_symbols
