	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function compute_quant_matrix
LCPI0_0:
	.quad	0x7fffffffffffffff              ## double NaN
	.quad	0x7fffffffffffffff              ## double NaN
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_2:
	.quad	0x4030000000000000              ## double 16
LCPI0_3:
	.quad	0xc040000000000000              ## double -32
LCPI0_4:
	.quad	0x406fe00000000000              ## double 255
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_compute_quant_matrix:                  ## @compute_quant_matrix
	.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	$552, %rsp                      ## imm = 0x228
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movapd	LCPI0_0(%rip), %xmm2            ## xmm2 = [NaN,NaN]
	andpd	%xmm0, %xmm2
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm2, %xmm1
	cmpl	$0, 24(%rdi)
	movq	%rdi, -584(%rbp)                ## 8-byte Spill
	jne	LBB0_7
## %bb.1:
	testb	$2, (%rdi)
	jne	LBB0_2
LBB0_7:
	xorpd	%xmm2, %xmm2
	ucomisd	%xmm2, %xmm0
	movsd	%xmm1, -576(%rbp)               ## 8-byte Spill
	jae	LBB0_8
## %bb.10:
	xorl	%r13d, %r13d
	movq	_unscaled_luma@GOTPCREL(%rip), %r15
	movq	_unscaled_chroma@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	%r13d, %ecx
	andl	$56, %ecx
	movl	%r14d, %ebx
	shrl	$3, %ebx
	addl	%ecx, %ebx
	movsd	LCPI0_4(%rip), %xmm0            ## xmm0 = mem[0],zero
	movapd	%xmm0, %xmm1
	subsd	(%rax,%rbx,8), %xmm1
	mulsd	-576(%rbp), %xmm1               ## 8-byte Folded Reload
	subsd	%xmm1, %xmm0
	movl	$1, %edi
	callq	_FFMAX
	movl	%eax, -304(%rbp,%r14,4)
	movq	(%r12), %rax
	movsd	LCPI0_4(%rip), %xmm0            ## xmm0 = mem[0],zero
	movapd	%xmm0, %xmm1
	subsd	(%rax,%rbx,8), %xmm1
	mulsd	-576(%rbp), %xmm1               ## 8-byte Folded Reload
	subsd	%xmm1, %xmm0
	movl	$1, %edi
	callq	_FFMAX
	movl	%eax, -560(%rbp,%r14,4)
	incq	%r14
	addl	$8, %r13d
	cmpq	$64, %r14
	jne	LBB0_11
	jmp	LBB0_12
LBB0_8:
	xorl	%r13d, %r13d
	movq	_unscaled_luma@GOTPCREL(%rip), %r15
	movq	_unscaled_chroma@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	%r13d, %ecx
	andl	$56, %ecx
	movl	%r14d, %ebx
	shrl	$3, %ebx
	addl	%ecx, %ebx
	movsd	(%rax,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	mulsd	-576(%rbp), %xmm0               ## 8-byte Folded Reload
	movl	$1, %edi
	callq	_FFMAX
	movl	%eax, -304(%rbp,%r14,4)
	movq	(%r12), %rax
	movsd	(%rax,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	mulsd	-576(%rbp), %xmm0               ## 8-byte Folded Reload
	movl	$1, %edi
	callq	_FFMAX
	movl	%eax, -560(%rbp,%r14,4)
	incq	%r14
	addl	$8, %r13d
	cmpq	$64, %r14
	jne	LBB0_9
LBB0_12:
	movq	_ff_zigzag_direct@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	-584(%rbp), %rax                ## 8-byte Reload
	movq	8(%rax), %rcx
	movq	16(%rax), %rdx
	xorl	%esi, %esi
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-304(%rbp,%rdi,4), %eax
	imull	%ebx, %eax
	movl	%eax, (%rcx,%rsi,4)
	imull	-560(%rbp,%rdi,4), %ebx
	movl	%ebx, (%rdx,%rsi,4)
	incq	%rsi
	cmpq	$64, %rsi
	je	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r8,%rsi,4), %rdi
	leal	7(%rdi), %ebx
	testq	%rdi, %rdi
	cmovnsl	%edi, %ebx
	btl	$3, %ebx
	movl	$1, %ebx
	jae	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	$-1, %ebx
	jmp	LBB0_15
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$552, %rsp                      ## imm = 0x228
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorpd	%xmm2, %xmm2
	ucomisd	%xmm2, %xmm0
	jae	LBB0_3
## %bb.5:
	mulsd	LCPI0_3(%rip), %xmm0
	addsd	LCPI0_2(%rip), %xmm0
	xorl	%ebx, %ebx
	movapd	%xmm0, -576(%rbp)               ## 16-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_FFMAX
	movl	%eax, -304(%rbp,%rbx,4)
	movl	$1, %edi
	movaps	-576(%rbp), %xmm0               ## 16-byte Reload
	callq	_FFMAX
	movapd	-576(%rbp), %xmm0               ## 16-byte Reload
	movl	%eax, -560(%rbp,%rbx,4)
	incq	%rbx
	cmpq	$64, %rbx
	jne	LBB0_6
	jmp	LBB0_12
LBB0_3:
	mulsd	LCPI0_2(%rip), %xmm1
	movsd	%xmm1, -576(%rbp)               ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	movsd	-576(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_FFMAX
	movl	%eax, -304(%rbp,%rbx,4)
	movl	$1, %edi
	movsd	-576(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_FFMAX
	movl	%eax, -560(%rbp,%rbx,4)
	incq	%rbx
	cmpq	$64, %rbx
	jne	LBB0_4
	jmp	LBB0_12
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_unscaled_luma,8,3              ## @unscaled_luma
	.comm	_unscaled_chroma,8,3            ## @unscaled_chroma
	.comm	_ff_zigzag_direct,8,3           ## @ff_zigzag_direct
	.no_dead_strip	_compute_quant_matrix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_quant_matrix
_compute_quant_matrix:                  ; @compute_quant_matrix
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	sub	sp, sp, #528
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-112]
	fabs	d1, d0
	fmov	d2, #1.00000000
	fsub	d8, d2, d1
	ldr	w8, [x0, #24]
	cbnz	w8, LBB0_2
; %bb.1:
	ldrb	w8, [x19]
	tbnz	w8, #1, LBB0_11
LBB0_2:
	mov	w20, #0
	mov	x21, #0
Lloh3:
	adrp	x22, _unscaled_luma@GOTPAGE
Lloh4:
	ldr	x22, [x22, _unscaled_luma@GOTPAGEOFF]
	fcmp	d0, #0.0
	b.ge	LBB0_5
; %bb.3:
	mov	x23, #246290604621824
	movk	x23, #16495, lsl #48
	add	x24, sp, #256
Lloh5:
	adrp	x25, _unscaled_chroma@GOTPAGE
Lloh6:
	ldr	x25, [x25, _unscaled_chroma@GOTPAGEOFF]
	mov	x26, sp
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	and	w9, w20, #0x38
	add	w9, w9, w21, lsr #3
	lsl	x27, x9, #3
	ldr	d0, [x8, x27]
	fmov	d9, x23
	fsub	d0, d9, d0
	fmsub	d0, d0, d8, d9
	mov	w0, #1
	bl	_FFMAX
	lsl	x28, x21, #2
	str	w0, [x24, x28]
	ldr	x8, [x25]
	ldr	d0, [x8, x27]
	fsub	d0, d9, d0
	fmsub	d0, d0, d8, d9
	mov	w0, #1
	bl	_FFMAX
	str	w0, [x26, x28]
	add	x21, x21, #1
	add	w20, w20, #8
	cmp	x21, #64
	b.ne	LBB0_4
	b	LBB0_7
LBB0_5:
	add	x23, sp, #256
Lloh7:
	adrp	x24, _unscaled_chroma@GOTPAGE
Lloh8:
	ldr	x24, [x24, _unscaled_chroma@GOTPAGEOFF]
	mov	x25, sp
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	and	w9, w20, #0x38
	add	w9, w9, w21, lsr #3
	lsl	x26, x9, #3
	ldr	d0, [x8, x26]
	fmul	d0, d8, d0
	mov	w0, #1
	bl	_FFMAX
	lsl	x27, x21, #2
	str	w0, [x23, x27]
	ldr	x8, [x24]
	ldr	d0, [x8, x26]
	fmul	d0, d8, d0
	mov	w0, #1
	bl	_FFMAX
	str	w0, [x25, x27]
	add	x21, x21, #1
	add	w20, w20, #8
	cmp	x21, #64
	b.ne	LBB0_6
LBB0_7:
	mov	x8, #0
Lloh9:
	adrp	x9, _ff_zigzag_direct@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ff_zigzag_direct@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldp	x10, x11, [x19, #8]
	add	x12, sp, #256
	mov	w13, #1
	mov	x14, sp
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x15, [x9, x8]
	lsl	x16, x15, #2
	ldr	w17, [x12, x16]
	add	w0, w15, #7
	cmp	w15, #0
	csel	w15, w0, w15, lt
	tst	w13, w15, lsr #3
	cneg	w15, w13, ne
	mul	w17, w15, w17
	str	w17, [x10, x8]
	ldr	w16, [x14, x16]
	mul	w15, w16, w15
	str	w15, [x11, x8]
	add	x8, x8, #4
	cmp	x8, #256
	b.ne	LBB0_8
; %bb.9:
	ldur	x8, [x29, #-112]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.10:
	add	sp, sp, #528
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x20, #0
	fcmp	d0, #0.0
	b.ge	LBB0_14
; %bb.12:
	mov	x8, #-4593671619917905920
	fmov	d1, x8
	fmov	d2, #16.00000000
	fmadd	d8, d0, d1, d2
	add	x21, sp, #256
	mov	x22, sp
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	fmov	d0, d8
	bl	_FFMAX
	str	w0, [x21, x20]
	mov	w0, #1
	fmov	d0, d8
	bl	_FFMAX
	str	w0, [x22, x20]
	add	x20, x20, #4
	cmp	x20, #256
	b.ne	LBB0_13
	b	LBB0_7
LBB0_14:
	fmov	d0, #16.00000000
	fmul	d8, d8, d0
	add	x21, sp, #256
	mov	x22, sp
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	fmov	d0, d8
	bl	_FFMAX
	str	w0, [x21, x20]
	mov	w0, #1
	fmov	d0, d8
	bl	_FFMAX
	str	w0, [x22, x20]
	add	x20, x20, #4
	cmp	x20, #256
	b.ne	LBB0_15
	b	LBB0_7
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_unscaled_luma,8,3              ; @unscaled_luma
	.comm	_unscaled_chroma,8,3            ; @unscaled_chroma
	.comm	_ff_zigzag_direct,8,3           ; @ff_zigzag_direct
	.no_dead_strip	_compute_quant_matrix
.subsections_via_symbols
