	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_dct_quantize_c              ## -- Begin function ff_dct_quantize_c
	.p2align	4, 0x90
_ff_dct_quantize_c:                     ## @ff_dct_quantize_c
	.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, %r15
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	*112(%r14)
	cmpq	$0, 104(%r14)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	*96(%r14)
LBB0_2:
	cmpq	$0, 88(%r14)
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.3:
	movl	$8, %ecx
	cmpl	$0, 72(%r14)
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	cmpl	$4, %r13d
	setge	%al
	movl	(%r14,%rax,4), %ecx
	shll	$3, %ecx
LBB0_5:
	movq	80(%r14), %r8
	movl	%ecx, %eax
	sarl	%eax
	addl	(%rbx), %eax
	cltd
	idivl	%ecx
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	cmpl	$4, %r13d
	setge	%al
	movslq	%r12d, %rdx
	shlq	$3, %rdx
	addq	8(%r14,%rax,8), %rdx
	leaq	24(%r14), %rdi
	movl	$1, %r10d
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_6:
	movslq	%r12d, %rdx
	shlq	$3, %rdx
	addq	32(%r14), %rdx
	movq	64(%r14), %r8
	leaq	40(%r14), %rdi
	xorl	%r10d, %r10d
	movl	$-1, %r12d
LBB0_7:
	movq	_QMAT_SHIFT@GOTPCREL(%rip), %rax
	movq	%rax, %r11
	movl	(%rax), %eax
	movq	_QUANT_BIAS_SHIFT@GOTPCREL(%rip), %rsi
	movl	%eax, %ecx
	subl	(%rsi), %ecx
	movl	(%rdi), %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movq	(%rdx), %r14
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %eax
	notl	%eax
	addl	%edx, %eax
	leal	(%rax,%rax), %r9d
	movl	%r10d, %esi
	movl	$63, %ecx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r8,%rcx,4), %rdi
	movl	(%r14,%rdi,4), %edx
	imull	(%rbx,%rdi,4), %edx
	addl	%eax, %edx
	cmpl	%r9d, %edx
	ja	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$0, (%rbx,%rdi,4)
	leaq	-1(%rcx), %rdx
	cmpq	%rsi, %rcx
	movq	%rdx, %rcx
	ja	LBB0_8
	jmp	LBB0_11
LBB0_10:
	movl	%ecx, %r12d
LBB0_11:
	movq	%r11, %rdx
	xorl	%r11d, %r11d
	movq	%r12, %rdi
	cmpl	%r12d, %esi
	jle	LBB0_12
LBB0_20:
	xorl	%eax, %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpl	%r11d, 44(%rdx)
	setl	%al
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	48(%rdx), %rax
	movq	_FF_IDCT_PERM_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rdi, %r14
	je	LBB0_22
## %bb.21:
	movl	56(%rdx), %esi
	movq	%rbx, %rdi
	movq	%r8, %rdx
	movl	%r14d, %ecx
	callq	_ff_block_permute
LBB0_22:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leal	1(%rdi), %r13d
	xorl	%r11d, %r11d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$0, (%rbx,%r15,4)
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rsi
	cmpq	%rsi, %r13
	je	LBB0_20
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r8,%rsi,4), %r15
	movl	(%r14,%r15,4), %r12d
	imull	(%rbx,%r15,4), %r12d
	leal	(%r12,%rax), %ecx
	cmpl	%r9d, %ecx
	jbe	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	testl	%r12d, %r12d
	jle	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	addl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movzbl	(%rdx), %ecx
	sarl	%cl, %r12d
	movl	%r12d, %r10d
	jmp	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-44(%rbp), %r10d                ## 4-byte Reload
	subl	%r12d, %r10d
	movzbl	(%rdx), %ecx
	sarl	%cl, %r10d
	movl	%r10d, %r12d
	negl	%r12d
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%r12d, (%rbx,%r15,4)
	orl	%r10d, %r11d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_QMAT_SHIFT,4,2                 ## @QMAT_SHIFT
	.comm	_QUANT_BIAS_SHIFT,4,2           ## @QUANT_BIAS_SHIFT
	.comm	_FF_IDCT_PERM_NONE,8,3          ## @FF_IDCT_PERM_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_dct_quantize_c              ; -- Begin function ff_dct_quantize_c
	.p2align	2
_ff_dct_quantize_c:                     ; @ff_dct_quantize_c
	.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	x21, x4
	mov	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #112]
	mov	x0, x1
	blr	x8
	ldr	x8, [x20, #104]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20, #96]
	mov	x0, x20
	mov	x1, x19
	blr	x8
LBB0_2:
	ldr	x8, [x20, #88]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x2, [x20, #80]
	ldr	w8, [x20, #72]
	cbz	w8, LBB0_6
; %bb.4:
	mov	w8, #8
	b	LBB0_7
LBB0_5:
	mov	w13, #0
	ldr	x2, [x20, #64]
	ldr	x8, [x20, #32]
	add	x10, x8, w23, sxtw #3
	add	x9, x20, #40
	mov	w22, #-1
	b	LBB0_8
LBB0_6:
	cmp	w24, #3
	cset	w8, gt
	ldr	w8, [x20, w8, uxtw #2]
	lsl	w8, w8, #3
LBB0_7:
	mov	w22, #0
	ldr	w9, [x19]
	add	w9, w9, w8, asr #1
	sdiv	w8, w9, w8
	str	w8, [x19]
	cmp	w24, #4
	mov	w8, #16
	mov	w9, #8
	csel	x8, x9, x8, lt
	ldr	x8, [x20, x8]
	add	x10, x8, w23, sxtw #3
	add	x9, x20, #24
	mov	w13, #1
LBB0_8:
Lloh0:
	adrp	x8, _QMAT_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QMAT_SHIFT@GOTPAGEOFF]
	ldr	w11, [x8]
Lloh2:
	adrp	x12, _QUANT_BIAS_SHIFT@GOTPAGE
Lloh3:
	ldr	x12, [x12, _QUANT_BIAS_SHIFT@GOTPAGEOFF]
	ldr	w9, [x9]
Lloh4:
	ldr	w12, [x12]
	sub	w12, w11, w12
	lsl	w9, w9, w12
	ldr	x10, [x10]
	mov	w12, #1
	lsl	w11, w12, w11
	mvn	w12, w9
	add	w11, w11, w12
	lsl	w12, w11, #1
	mov	w15, w13
	mov	w13, #63
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x14, [x2, x13, lsl #2]
	lsl	x16, x14, #2
	ldr	w17, [x19, x16]
	ldr	w16, [x10, x16]
	madd	w16, w16, w17, w11
	cmp	w16, w12
	b.hi	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	wzr, [x19, x14, lsl #2]
	sub	x14, x13, #1
	cmp	x13, x15
	mov	x13, x14
	b.hi	LBB0_9
; %bb.11:
	cmp	w15, w22
	b.le	LBB0_17
LBB0_12:
	mov	w13, #0
LBB0_13:
	ldr	w8, [x20, #44]
	cmp	w8, w13
	cset	w8, lt
	str	w8, [x21]
	ldr	x8, [x20, #48]
Lloh5:
	adrp	x9, _FF_IDCT_PERM_NONE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FF_IDCT_PERM_NONE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.14:
	ldr	w1, [x20, #56]
	mov	x0, x19
	mov	x3, x22
	bl	_ff_block_permute
LBB0_15:
	mov	x0, x22
	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
LBB0_16:
	mov	x22, x13
	cmp	w15, w22
	b.gt	LBB0_12
LBB0_17:
	mov	w13, #0
	add	w16, w22, #1
	add	x14, x2, x15, lsl #2
	sub	x15, x16, x15
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	str	wzr, [x19, x16, lsl #2]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x14, x14, #4
	subs	x15, x15, #1
	b.eq	LBB0_13
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x16, [x14]
	lsl	x17, x16, #2
	ldr	w0, [x19, x17]
	ldr	w17, [x10, x17]
	mul	w17, w17, w0
	add	w0, w17, w11
	cmp	w0, w12
	b.ls	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	cmp	w17, #1
	b.lt	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	add	w17, w17, w9
	ldr	w0, [x8]
	asr	w0, w17, w0
	mov	x17, x0
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_20 Depth=1
	sub	w17, w9, w17
	ldr	w0, [x8]
	asr	w17, w17, w0
	neg	w0, w17
LBB0_24:                                ;   in Loop: Header=BB0_20 Depth=1
	str	w0, [x19, x16, lsl #2]
	orr	w13, w17, w13
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_QMAT_SHIFT,4,2                 ; @QMAT_SHIFT
	.comm	_QUANT_BIAS_SHIFT,4,2           ; @QUANT_BIAS_SHIFT
	.comm	_FF_IDCT_PERM_NONE,8,3          ; @FF_IDCT_PERM_NONE
.subsections_via_symbols
