	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function binkaudio_receive_frame
_binkaudio_receive_frame:               ## @binkaudio_receive_frame
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	16(%rdi), %r13
	leaq	16(%r13), %r12
	movq	8(%r13), %rsi
	cmpl	$0, 4(%rsi)
	je	LBB0_4
LBB0_1:
	movl	(%r13), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_11
## %bb.2:
	movq	8(%r15), %rsi
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	_AV_CODEC_ID_BINKAUDIO_DCT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movq	%r13, %rdi
	callq	_decode_block
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_16
LBB0_4:
	movq	%r14, %rdi
	callq	_ff_decode_get_packet
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movq	8(%r13), %rax
	movl	(%rax), %edx
	cmpl	$3, %edx
	jg	LBB0_12
## %bb.6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_8:
	movq	%r12, %rdi
	callq	_get_bits_align32
	movq	%r12, %rdi
	callq	_get_bits_left
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	8(%r13), %rdi
	callq	_av_packet_unref
LBB0_10:
	movl	4(%r13), %eax
	cltd
	idivl	(%r14)
	movl	%eax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_12:
	movl	4(%rax), %esi
	movq	%r12, %rdi
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_skip_bits_long
	jmp	LBB0_1
LBB0_14:
	movl	%eax, %ebx
LBB0_15:
	movq	8(%r13), %rdi
	callq	_av_packet_unref
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	"Packet is too small\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_CODEC_ID_BINKAUDIO_DCT,8,3  ## @AV_CODEC_ID_BINKAUDIO_DCT
L_.str.1:                               ## @.str.1
	.asciz	"Incomplete packet\n"

	.no_dead_strip	_binkaudio_receive_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function binkaudio_receive_frame
_binkaudio_receive_frame:               ; @binkaudio_receive_frame
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
	add	x22, x19, #16
	ldr	x1, [x19, #8]
	ldr	w8, [x1, #4]
	cbz	w8, LBB0_4
LBB0_1:
	ldr	w8, [x19]
	str	w8, [x21]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	x1, [x21, #8]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AV_CODEC_ID_BINKAUDIO_DCT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_ID_BINKAUDIO_DCT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w2, eq
	mov	x0, x19
	bl	_decode_block
	cbz	x0, LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	b	LBB0_15
LBB0_4:
	mov	x0, x20
	bl	_ff_decode_get_packet
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	cmp	w2, #3
	b.gt	LBB0_11
; %bb.6:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh16:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	b	LBB0_14
LBB0_7:
	mov	x23, x0
	b	LBB0_15
LBB0_8:
	mov	x0, x22
	bl	_get_bits_align32
	mov	x0, x22
	bl	_get_bits_left
	cbnz	w0, LBB0_10
; %bb.9:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x0, [x19, #8]
	bl	_av_packet_unref
LBB0_10:
	mov	w23, #0
	ldr	w8, [x19, #4]
	ldr	w9, [x20]
	sdiv	w8, w8, w9
	str	w8, [x21]
	b	LBB0_15
LBB0_11:
	ldr	w1, [x8, #4]
	mov	x0, x22
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_13
; %bb.12:
	mov	x0, x22
	mov	w1, #32
	bl	_skip_bits_long
	b	LBB0_1
LBB0_13:
	mov	x23, x0
LBB0_14:
	ldr	x0, [x19, #8]
	bl	_av_packet_unref
LBB0_15:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Packet is too small\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_CODEC_ID_BINKAUDIO_DCT,8,3  ; @AV_CODEC_ID_BINKAUDIO_DCT
l_.str.1:                               ; @.str.1
	.asciz	"Incomplete packet\n"

	.no_dead_strip	_binkaudio_receive_frame
.subsections_via_symbols
