	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adx_read_packet
_adx_read_packet:                       ## @adx_read_packet
	.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	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	movq	16(%rbx), %r12
	movq	_BLOCK_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %r15d
	movl	(%rbx), %edi
	callq	_avio_tell
	movl	%eax, (%r14)
	movq	$0, 24(%r14)
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_av_get_packet
	cmpl	%r15d, %eax
	jne	LBB0_5
## %bb.2:
	movl	16(%r14), %edi
	callq	_AV_RB16
	testl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_7
## %bb.3:
	movl	%r15d, 4(%r14)
	movl	$1, 8(%r14)
	movl	(%r14), %eax
	subl	(%r12), %eax
	cltd
	idivl	%r15d
	movl	%eax, 12(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_av_packet_unref
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_7:
	movq	%r14, %rdi
	callq	_av_packet_unref
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid number of channels %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_BLOCK_SIZE,4,2                 ## @BLOCK_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_adx_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adx_read_packet
_adx_read_packet:                       ; @adx_read_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w3, [x8]
	cmp	w3, #0
	b.le	LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	x22, [x21, #16]
Lloh0:
	adrp	x8, _BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLOCK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w20, w8, w3
	ldr	w0, [x21]
	bl	_avio_tell
	str	w0, [x19]
	str	xzr, [x19, #24]
	ldr	w0, [x21]
	mov	x1, x19
	mov	x2, x20
	bl	_av_get_packet
	cmp	w0, w20
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_AV_RB16
	tbnz	w0, #15, LBB0_7
; %bb.3:
	mov	w21, #0
	mov	w8, #1
	stp	w20, w8, [x19, #4]
	ldr	w8, [x19]
	ldr	w9, [x22]
	sub	w8, w8, w9
	sdiv	w8, w8, w20
	str	w8, [x19, #12]
	b	LBB0_9
LBB0_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
	mov	x0, x21
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	x21, x0
	mov	x0, x19
	bl	_av_packet_unref
	tbnz	w21, #31, LBB0_9
; %bb.6:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_7:
	mov	x0, x19
	bl	_av_packet_unref
Lloh13:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_8:
	ldr	w21, [x8]
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid number of channels %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_BLOCK_SIZE,4,2                 ; @BLOCK_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_adx_read_packet
.subsections_via_symbols
