	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_adx_decode_header           ## -- Begin function ff_adx_decode_header
	.p2align	4, 0x90
_ff_adx_decode_header:                  ## @ff_adx_decode_header
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$23, %edx
	jle	LBB0_5
## %bb.1:
	movq	%r8, %r15
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_AV_RB16
	cmpl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_5
## %bb.2:
	leaq	8(%r13), %rdi
	callq	_AV_RB16
                                        ## kill: def $eax killed $eax def $rax
	leal	4(%rax), %ecx
	cmpl	$2, %eax
	jl	LBB0_8
## %bb.3:
	cmpl	%ebx, %ecx
	jg	LBB0_8
## %bb.4:
	movl	%ecx, %eax
	leaq	-24(,%rax,4), %rdi
	addq	%r13, %rdi
	leaq	L_.str(%rip), %rsi
	movl	$6, %edx
	movl	%ecx, %ebx
	callq	_memcmp
	movl	%ebx, %ecx
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpl	$3, 16(%r13)
	jne	LBB0_17
## %bb.9:
	cmpl	$18, 20(%r13)
	jne	LBB0_17
## %bb.10:
	cmpl	$4, 24(%r13)
	jne	LBB0_17
## %bb.11:
	movl	28(%r13), %eax
	movl	%eax, (%r12)
	addl	$-3, %eax
	cmpl	$-3, %eax
	jbe	LBB0_5
## %bb.12:
	movl	%ecx, %ebx
	leaq	32(%r13), %rdi
	callq	_AV_RB32
	movl	%eax, 4(%r12)
	testl	%eax, %eax
	jle	LBB0_5
## %bb.13:
	movl	%eax, %ecx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_BLOCK_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	imull	(%r12), %esi
	shll	$3, %esi
	cltd
	idivl	%esi
	cmpl	%eax, %ecx
	jg	LBB0_5
## %bb.14:
	imull	%ecx, %esi
	movq	_BLOCK_SAMPLES@GOTPCREL(%rip), %rcx
	movl	%esi, %eax
	cltd
	idivl	(%rcx)
	movl	%eax, 8(%r12)
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:
	addq	$64, %r13
	movq	%r13, %rdi
	callq	_AV_RB16
	movl	4(%r12), %esi
	movq	_COEFF_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%r15, %rcx
	callq	_ff_adx_calculate_coeffs
LBB0_16:
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_17:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_avpriv_request_sample
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(c)CRI"

L_.str.1:                               ## @.str.1
	.asciz	"Support for this ADX format"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_BLOCK_SIZE,4,2                 ## @BLOCK_SIZE
	.comm	_BLOCK_SAMPLES,4,2              ## @BLOCK_SAMPLES
	.comm	_COEFF_BITS,4,2                 ## @COEFF_BITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_adx_decode_header           ; -- Begin function ff_adx_decode_header
	.p2align	2
_ff_adx_decode_header:                  ; @ff_adx_decode_header
	.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
	cmp	w2, #23
	b.le	LBB0_5
; %bb.1:
	mov	x20, x4
	mov	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x1
	bl	_AV_RB16
	cmp	w0, #8, lsl #12                 ; =32768
	b.ne	LBB0_5
; %bb.2:
	add	x0, x22, #8
	bl	_AV_RB16
	add	w24, w0, #4
	cmp	w0, #2
	b.lt	LBB0_8
; %bb.3:
	cmp	w24, w23
	b.gt	LBB0_8
; %bb.4:
	add	x8, x22, w24, uxtw #2
	sub	x0, x8, #24
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #6
	bl	_memcmp
	cbz	x0, LBB0_8
LBB0_5:
Lloh2:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	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_8:
	ldr	w8, [x22, #16]
	cmp	w8, #3
	b.ne	LBB0_17
; %bb.9:
	ldr	w8, [x22, #20]
	cmp	w8, #18
	b.ne	LBB0_17
; %bb.10:
	ldr	w8, [x22, #24]
	cmp	w8, #4
	b.ne	LBB0_17
; %bb.11:
	ldr	w8, [x22, #28]
	str	w8, [x21]
	sub	w8, w8, #3
	cmn	w8, #3
	b.ls	LBB0_5
; %bb.12:
	add	x0, x22, #32
	bl	_AV_RB32
	str	w0, [x21, #4]
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.13:
Lloh4:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x8]
Lloh7:
	adrp	x8, _BLOCK_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BLOCK_SIZE@GOTPAGEOFF]
	ldr	w10, [x21]
Lloh9:
	ldr	w8, [x8]
	mul	w8, w8, w10
	lsl	w8, w8, #3
	sdiv	w9, w9, w8
	cmp	w0, w9
	b.gt	LBB0_5
; %bb.14:
	mul	w8, w8, w0
Lloh10:
	adrp	x9, _BLOCK_SAMPLES@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BLOCK_SAMPLES@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	str	w8, [x21, #8]
	cbz	x20, LBB0_16
; %bb.15:
	add	x0, x22, #64
	bl	_AV_RB16
	ldr	w1, [x21, #4]
Lloh13:
	adrp	x8, _COEFF_BITS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _COEFF_BITS@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x3, x20
	bl	_ff_adx_calculate_coeffs
LBB0_16:
	mov	w0, #0
	str	w24, [x19]
	b	LBB0_7
LBB0_17:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_avpriv_request_sample
Lloh18:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(c)CRI"

l_.str.1:                               ; @.str.1
	.asciz	"Support for this ADX format"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_BLOCK_SIZE,4,2                 ; @BLOCK_SIZE
	.comm	_BLOCK_SAMPLES,4,2              ; @BLOCK_SAMPLES
	.comm	_COEFF_BITS,4,2                 ; @COEFF_BITS
.subsections_via_symbols
