	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnxhd_10bit_dct_quantize_444
_dnxhd_10bit_dct_quantize_444:          ## @dnxhd_10bit_dct_quantize_444
	.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	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	xorl	%r12d, %r12d
	cmpl	$4, %edx
	setge	%r12b
	movq	48(%rdi), %r14
	movq	%rsi, %rdi
	callq	*40(%r15)
	movq	%r15, %rsi
	movl	(%rbx), %eax
	addl	$2, %eax
	sarl	$2, %eax
	movl	%eax, (%rbx)
	movq	(%r15,%r12,8), %rax
	movslq	%r13d, %rcx
	movq	(%rax,%rcx,8), %r11
	movl	16(%r15), %r12d
	shll	$8, %r12d
	movl	$65535, %edx                    ## imm = 0xFFFF
	subl	%r12d, %edx
	leal	(%rdx,%rdx), %r15d
	movl	$63, %ecx
	movl	$62, %r13d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r14,%rcx,4), %rax
	movl	(%r11,%rax,4), %edi
	imull	(%rbx,%rax,4), %edi
	addl	%edx, %edi
	cmpl	%r15d, %edi
	ja	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%rbx,%rax,4)
	cmpl	$2, %ecx
	jb	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r13d, %eax
	movslq	(%r14,%rax,4), %rax
	movl	(%r11,%rax,4), %edi
	imull	(%rbx,%rax,4), %edi
	addl	%edx, %edi
	cmpl	%r15d, %edi
	ja	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%rbx,%rax,4)
	addq	$-2, %rcx
	addl	$-2, %r13d
	jmp	LBB0_1
LBB0_5:
	movl	%ecx, %r13d
LBB0_6:
	testl	%r13d, %r13d
	jle	LBB0_17
## %bb.7:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, %r9d
	xorl	%ecx, %ecx
	xorl	%r10d, %r10d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=1
	movl	$0, (%rbx,%rdi,4)
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incq	%rcx
	cmpq	%rcx, %r9
	je	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movslq	4(%r14,%rcx,4), %rdi
	movl	(%r11,%rdi,4), %eax
	imull	(%rbx,%rdi,4), %eax
	leal	(%rax,%rdx), %esi
	cmpl	%r15d, %esi
	jbe	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	testl	%eax, %eax
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	addl	%r12d, %eax
	sarl	$16, %eax
	movl	%eax, %r8d
	jmp	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%r12d, %r8d
	subl	%eax, %r8d
	sarl	$16, %r8d
	movl	%r8d, %eax
	negl	%eax
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, (%rbx,%rdi,4)
	orl	%r8d, %r10d
	jmp	LBB0_9
LBB0_15:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_16:
	xorl	%r13d, %r13d
LBB0_17:
	xorl	%r10d, %r10d
LBB0_18:
	xorl	%eax, %eax
	cmpl	%r10d, 20(%rsi)
	setl	%al
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	24(%rsi), %rax
	movq	_FF_IDCT_PERM_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_20
## %bb.19:
	movl	32(%rsi), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	callq	_ff_block_permute
LBB0_20:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_IDCT_PERM_NONE,8,3          ## @FF_IDCT_PERM_NONE
	.no_dead_strip	_dnxhd_10bit_dct_quantize_444
.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_444
_dnxhd_10bit_dct_quantize_444:          ; @dnxhd_10bit_dct_quantize_444
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x4
	mov	x23, x3
	mov	x19, x1
	mov	x21, x0
	cmp	w2, #3
	cset	w24, gt
	ldp	x8, x20, [x0, #40]
	mov	x0, x1
	blr	x8
	ldr	w8, [x19]
	add	w8, w8, #2
	asr	w8, w8, #2
	str	w8, [x19]
	ldr	x8, [x21, w24, uxtw #3]
	ldr	x8, [x8, w23, sxtw #3]
	ldr	w9, [x21, #16]
	lsl	w9, w9, #8
	mov	w10, #65535
	sub	w10, w10, w9
	lsl	w11, w10, #1
	mov	w23, #63
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x12, [x20, w23, uxtw #2]
	lsl	x13, x12, #2
	ldr	w14, [x19, x13]
	ldr	w13, [x8, x13]
	madd	w13, w13, w14, w10
	cmp	w13, w11
	b.hi	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	str	wzr, [x19, x12, lsl #2]
	sub	x23, x23, #1
	add	w12, w23, #1
	cmp	w12, #1
	b.hi	LBB0_1
; %bb.3:
	mov	w23, #0
	b	LBB0_10
LBB0_4:
	cmp	w23, #0
	b.le	LBB0_10
; %bb.5:
	mov	w12, #0
	add	x13, x20, #4
	mov	x14, x23
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	str	wzr, [x19, x15, lsl #2]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x13, x13, #4
	subs	x14, x14, #1
	b.eq	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x15, [x13]
	lsl	x16, x15, #2
	ldr	w17, [x19, x16]
	ldr	w16, [x8, x16]
	mul	w16, w16, w17
	add	w17, w16, w10
	cmp	w17, w11
	b.ls	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	w17, w9, w16
	asr	w17, w17, #16
	add	w0, w16, w9
	asr	w0, w0, #16
	cmp	w16, #1
	csel	w16, w17, w0, lt
	csneg	w17, w0, w17, ge
	str	w17, [x19, x15, lsl #2]
	orr	w12, w16, w12
	b	LBB0_7
LBB0_10:
	mov	w12, #0
LBB0_11:
	ldr	w8, [x21, #20]
	cmp	w8, w12
	cset	w8, lt
	str	w8, [x22]
	ldr	x8, [x21, #24]
Lloh0:
	adrp	x9, _FF_IDCT_PERM_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FF_IDCT_PERM_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.12:
	ldr	w1, [x21, #32]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x23
	bl	_ff_block_permute
LBB0_13:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_IDCT_PERM_NONE,8,3          ; @FF_IDCT_PERM_NONE
	.no_dead_strip	_dnxhd_10bit_dct_quantize_444
.subsections_via_symbols
