	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wsaud_read_packet
_wsaud_read_packet:                     ## @wsaud_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r12
	movq	_AUD_CHUNK_PREAMBLE_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%r13), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_avio_read
	cmpl	(%r15), %eax
	jne	LBB0_12
## %bb.1:
	leaq	4(%r14), %rdi
	callq	_AV_RL32
	movq	_AUD_CHUNK_SIGNATURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.2:
	movq	%r14, %rdi
	callq	_AV_RL16
	movq	%rax, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movq	_AV_CODEC_ID_WESTWOOD_SND1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	addq	$2, %r14
	movq	%r14, %rdi
	callq	_AV_RL16
	movq	%rax, %r14
	leal	4(%r15), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_avio_read
	cmpl	%r15d, %eax
	jne	LBB0_11
## %bb.5:
	movq	(%rbx), %rdi
	movl	%r14d, %esi
	callq	_AV_WL16
	movq	(%rbx), %rdi
	addq	$2, %rdi
	movl	%r15d, %esi
	callq	_AV_WL16
	jmp	LBB0_9
LBB0_6:
	movq	%r12, %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_av_get_packet
	cmpl	%r15d, %eax
	jne	LBB0_12
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	8(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.8:
	leal	(%r15,%r15), %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
LBB0_9:
	movl	%r14d, 8(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	jmp	LBB0_15
LBB0_11:
	testl	%eax, %eax
	js	LBB0_10
LBB0_12:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	jmp	LBB0_15
LBB0_10:
	movl	%eax, %r15d
	jmp	LBB0_15
LBB0_13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	callq	_av_log
LBB0_14:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.16:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AUD_CHUNK_PREAMBLE_SIZE,4,2    ## @AUD_CHUNK_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AUD_CHUNK_SIGNATURE,8,3        ## @AUD_CHUNK_SIGNATURE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_CODEC_ID_WESTWOOD_SND1,8,3  ## @AV_CODEC_ID_WESTWOOD_SND1
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid number of channels %d\n"

	.no_dead_strip	_wsaud_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wsaud_read_packet
_wsaud_read_packet:                     ; @wsaud_read_packet
	.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
	sub	sp, sp, #16
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x22, [x0, #8]
Lloh3:
	adrp	x20, _AUD_CHUNK_PREAMBLE_SIZE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AUD_CHUNK_PREAMBLE_SIZE@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x9, x2
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	ldr	x8, [x0]
	ldr	x24, [x8]
	mov	x0, x22
	mov	x1, x23
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_avio_read
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.1:
	add	x0, x23, #4
	bl	_AV_RL32
Lloh7:
	adrp	x8, _AUD_CHUNK_SIGNATURE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AUD_CHUNK_SIGNATURE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.2:
	mov	x0, x23
	bl	_AV_RL16
	mov	x20, x0
	ldr	x8, [x24, #8]
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _AV_CODEC_ID_WESTWOOD_SND1@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AV_CODEC_ID_WESTWOOD_SND1@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	add	x0, x23, #2
	bl	_AV_RL16
	mov	x21, x0
	add	w1, w20, #4
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	x8, [x19]
	add	x1, x8, #4
	mov	x0, x22
	mov	x2, x20
	bl	_avio_read
	cmp	w0, w20
	b.ne	LBB0_11
; %bb.5:
	ldr	x0, [x19]
	mov	x1, x21
	bl	_AV_WL16
	ldr	x8, [x19]
	add	x0, x8, #2
	mov	x1, x20
	bl	_AV_WL16
	b	LBB0_9
LBB0_6:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	bl	_av_get_packet
	cmp	w0, w20
	b.ne	LBB0_12
; %bb.7:
	ldr	x8, [x24, #8]
	ldr	w8, [x8, #8]
	cbz	w8, LBB0_13
; %bb.8:
	lsl	w9, w20, #1
	udiv	w21, w9, w8
LBB0_9:
	ldr	w8, [x24]
	stp	w21, w8, [x19, #8]
	b	LBB0_15
LBB0_10:
	mov	x20, x0
	b	LBB0_15
LBB0_11:
	mov	x20, x0
	tbnz	w0, #31, LBB0_15
LBB0_12:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_15
LBB0_13:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str@PAGE
Lloh20:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	w3, #0
	bl	_av_log
LBB0_14:
Lloh21:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x8]
LBB0_15:
	ldur	x8, [x29, #-56]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x20
	sub	sp, x29, #48
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AUD_CHUNK_PREAMBLE_SIZE,4,2    ; @AUD_CHUNK_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AUD_CHUNK_SIGNATURE,8,3        ; @AUD_CHUNK_SIGNATURE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_CODEC_ID_WESTWOOD_SND1,8,3  ; @AV_CODEC_ID_WESTWOOD_SND1
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid number of channels %d\n"

	.no_dead_strip	_wsaud_read_packet
.subsections_via_symbols
