	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dct_single_coeff_elimination
_dct_single_coeff_elimination:          ## @dct_single_coeff_elimination
	.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, %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movslq	%esi, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rcx,4), %eax
	movl	%edx, %ecx
	notl	%ecx
	shrl	$31, %ecx
	negl	%edx
	cmovsl	%r13d, %edx
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %eax
	jl	LBB0_17
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rbx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	leaq	1(%rax), %r12
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movslq	%r14d, %rax
	leaq	_dct_single_coeff_elimination.tab(%rip), %rcx
	movsbl	(%rax,%rcx), %eax
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	xorl	%r14d, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	cmpq	%r15, %r12
	je	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movslq	(%rax,%r15,4), %rax
	movq	(%rbx,%rax,8), %rdi
	callq	_FFABS
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, %r13d
	js	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	testq	%r15, %r15
	je	LBB0_10
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	jg	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%r14d
	jmp	LBB0_10
LBB0_2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_17
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %ecx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	incl	%r8d
	movl	%r8d, %esi
	subl	%edx, %esi
	movq	%rcx, %rdx
	notq	%rdx
	addq	%r8, %rdx
	andq	$3, %rsi
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%rax,%rcx,4), %rdi
	movq	$0, (%rbx,%rdi,8)
	incq	%rcx
	decq	%rsi
	jne	LBB0_13
LBB0_14:
	cmpq	$3, %rdx
	jb	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%rax,%rcx,4), %rdx
	movq	$0, (%rbx,%rdx,8)
	movslq	4(%rax,%rcx,4), %rdx
	movq	$0, (%rbx,%rdx,8)
	movslq	8(%rax,%rcx,4), %rdx
	movq	$0, (%rbx,%rdx,8)
	movslq	12(%rax,%rcx,4), %rdx
	movq	$0, (%rbx,%rdx,8)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_15
LBB0_16:
	xorl	%eax, %eax
	cmpq	$1, (%rbx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	sbbl	%eax, %eax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rdx,4)
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @dct_single_coeff_elimination.tab
_dct_single_coeff_elimination.tab:
	.ascii	"\003\002\002\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
	.space	40

	.no_dead_strip	_dct_single_coeff_elimination
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dct_single_coeff_elimination
_dct_single_coeff_elimination:          ; @dct_single_coeff_elimination
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.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
	ldr	x8, [x0]
	ldr	w24, [x8, w1, sxtw #2]
	mvn	w8, w2
	lsr	w23, w8, #31
	cmp	w2, #0
	cneg	w8, w2, mi
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	cmp	w24, w23
	b.lt	LBB0_20
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x22, [x8, w1, sxtw #3]
	tbnz	w24, #31, LBB0_10
; %bb.2:
	mov	x21, x2
	mov	x27, #0
	mov	w26, #0
	mov	w28, #0
	lsl	x8, x24, #2
	add	x25, x8, #4
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh0:
	adrp	x8, _dct_single_coeff_elimination.tab@PAGE
Lloh1:
	add	x8, x8, _dct_single_coeff_elimination.tab@PAGEOFF
	ldrsb	w8, [x8, w28, sxtw]
	mov	w28, #0
	add	w26, w26, w8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #4
	cmp	x25, x27
	b.eq	LBB0_11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8, x27]
	ldr	x0, [x22, x8, lsl #3]
	bl	_FFABS
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w21, #31, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	x27, LBB0_4
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	b.gt	LBB0_20
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w28, w28, #1
	b	LBB0_4
LBB0_10:
	mov	w26, #0
LBB0_11:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w26, w8
	b.ge	LBB0_20
; %bb.12:
	sxtw	x8, w20
	ldr	x9, [x19, #8]
	add	w10, w24, #1
	sub	x12, x10, x23
	cmp	x12, #4
	b.hs	LBB0_14
; %bb.13:
	mov	x11, x23
	b	LBB0_17
LBB0_14:
	mov	x13, #0
	and	x14, x12, #0xfffffffffffffffc
	orr	x11, x14, x23
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	orr	x15, x13, x23
	lsl	x15, x15, #2
	add	x16, x9, x15
	orr	x15, x15, #0x8
	ldrsw	x15, [x9, x15]
	ldpsw	x17, x0, [x16]
	ldrsw	x16, [x16, #12]
	str	xzr, [x22, x17, lsl #3]
	str	xzr, [x22, x0, lsl #3]
	str	xzr, [x22, x15, lsl #3]
	str	xzr, [x22, x16, lsl #3]
	add	x13, x13, #4
	cmp	x14, x13
	b.ne	LBB0_15
; %bb.16:
	cmp	x12, x14
	b.eq	LBB0_19
LBB0_17:
	add	x9, x9, x11, lsl #2
	sub	x10, x10, x11
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x11, [x9], #4
	str	xzr, [x22, x11, lsl #3]
	subs	x10, x10, #1
	b.ne	LBB0_18
LBB0_19:
	ldr	x9, [x22]
	ldr	x10, [x19]
	cmp	x9, #0
	csetm	w9, eq
	str	w9, [x10, x8, lsl #2]
LBB0_20:
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_dct_single_coeff_elimination.tab:      ; @dct_single_coeff_elimination.tab
	.ascii	"\003\002\002\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
	.space	40

	.no_dead_strip	_dct_single_coeff_elimination
.subsections_via_symbols
