	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adx_read_header
_adx_read_header:                       ## @adx_read_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r12
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %r15
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	movl	8(%rbx), %edi
	callq	_avio_rb16
	cmpl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_2
## %bb.3:
	movl	8(%rbx), %edi
	callq	_avio_rb16
	addl	$4, %eax
	movl	%eax, (%r12)
	movl	8(%rbx), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-4, %esi
	callq	_avio_seek
	movl	8(%rbx), %edx
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ff_get_extradata
	testq	%rax, %rax
	js	LBB0_16
## %bb.4:
	cmpl	$11, (%r14)
	jg	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_2
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movq	40(%r14), %rdi
	addq	$7, %rdi
	callq	_AV_RB8
	movq	%rax, 8(%r14)
	movq	40(%r14), %rdi
	addq	$8, %rdi
	callq	_AV_RB32
	movq	%rax, 16(%r14)
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	jle	LBB0_7
## %bb.9:
	movq	%rax, %r8
	testq	%rax, %rax
	jle	LBB0_10
## %bb.11:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	_BLOCK_SIZE@GOTPCREL(%rip), %rdx
	movq	%r8, %rax
	imulq	%rcx, %rax
	imulq	(%rdx), %rax
	shlq	$3, %rax
	movq	_BLOCK_SAMPLES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	%rax, %rcx
	orq	%rbx, %rcx
	shrq	$32, %rcx
	je	LBB0_12
## %bb.13:
	cqto
	idivq	%rbx
	jmp	LBB0_14
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	jmp	LBB0_8
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r8, %rcx
LBB0_8:
	xorl	%eax, %eax
	callq	_av_log
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_14:
	movq	%rax, 24(%r14)
	movq	%r15, %rdi
	movl	$64, %esi
	movq	%rbx, %rdx
	movq	%r8, %rcx
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid extradata size.\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid number of channels %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid sample rate %d\n"

	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_BLOCK_SIZE,8,3                 ## @BLOCK_SIZE
	.comm	_BLOCK_SAMPLES,8,3              ## @BLOCK_SAMPLES
	.no_dead_strip	_adx_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adx_read_header
_adx_read_header:                       ; @adx_read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x22, [x0, #24]
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x21, [x8]
	ldr	w0, [x19, #8]
	bl	_avio_rb16
	cmp	w0, #8, lsl #12                 ; =32768
	b.ne	LBB0_12
; %bb.2:
	ldr	w0, [x19, #8]
	bl	_avio_rb16
	add	w8, w0, #4
	str	w8, [x22]
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #-4
	bl	_avio_seek
	ldr	w2, [x19, #8]
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_ff_get_extradata
	tbnz	x0, #63, LBB0_5
; %bb.3:
	ldr	w8, [x21]
	cmp	w8, #11
	b.gt	LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_11
LBB0_5:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	b	_AVERROR
LBB0_6:
	ldr	x8, [x21, #40]
	add	x0, x8, #7
	bl	_AV_RB8
	str	x0, [x21, #8]
	ldr	x8, [x21, #40]
	add	x0, x8, #8
	bl	_AV_RB32
	str	x0, [x21, #16]
	ldr	x8, [x21, #8]
	cmp	x8, #0
	b.le	LBB0_9
; %bb.7:
	mov	x3, x0
	cmp	x0, #0
	b.le	LBB0_10
; %bb.8:
Lloh11:
	adrp	x9, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	ldr	x10, [x19]
	ldr	w10, [x10]
	stp	w10, w9, [x21, #32]
Lloh14:
	adrp	x9, _BLOCK_SIZE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BLOCK_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	mul	x8, x3, x8
	mul	x8, x8, x9
	lsl	x8, x8, #3
Lloh17:
	adrp	x9, _BLOCK_SAMPLES@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BLOCK_SAMPLES@GOTPAGEOFF]
Lloh19:
	ldr	x2, [x9]
	sdiv	x8, x8, x2
	str	x8, [x21, #24]
	mov	x0, x20
	mov	w1, #64
	bl	_avpriv_set_pts_info
	mov	w0, #0
	b	LBB0_13
LBB0_9:
Lloh20:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh23:
	adrp	x2, l_.str.1@PAGE
Lloh24:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh25:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	str	x3, [sp]
Lloh28:
	adrp	x2, l_.str.2@PAGE
Lloh29:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_av_log
LBB0_12:
Lloh30:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
LBB0_13:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid extradata size.\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid number of channels %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid sample rate %d\n"

	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_BLOCK_SIZE,8,3                 ; @BLOCK_SIZE
	.comm	_BLOCK_SAMPLES,8,3              ; @BLOCK_SAMPLES
	.no_dead_strip	_adx_read_header
.subsections_via_symbols
