	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ac3_handle_packet
_ac3_handle_packet:                     ## @ac3_handle_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	%r8, %r14
	movq	%rdi, %r8
	movl	16(%rbp), %ebx
	movq	_RTP_AC3_PAYLOAD_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%ebx, %eax
	jge	LBB0_1
## %bb.4:
	movq	%rcx, %r12
	movq	%rsi, %r15
	movl	(%r9), %ecx
	movl	4(%r9), %r13d
	andl	$3, %ecx
	leaq	(%r9,%rax,4), %rsi
	subl	%eax, %ebx
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jae	LBB0_5
## %bb.12:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_ffio_free_dyn_buf
	movl	$1, (%r15)
	movl	%r13d, 4(%r15)
	movq	%r12, %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_26
## %bb.13:
	movl	8(%r15), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_avio_write
	movl	(%r14), %eax
	movl	%eax, 12(%r15)
	jmp	LBB0_20
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r8, %rdi
	movl	%ebx, %ecx
LBB0_2:
	xorl	%eax, %eax
	callq	_av_log
LBB0_3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpl	$3, %ecx
	jne	LBB0_6
## %bb.14:
	movl	8(%r15), %edi
	testl	%edi, %edi
	je	LBB0_15
## %bb.16:
	leaq	8(%r15), %rcx
	cmpl	4(%r15), %r13d
	jne	LBB0_18
## %bb.17:
	movl	12(%r15), %eax
	cmpl	(%r14), %eax
	jne	LBB0_18
## %bb.19:
	movq	%rcx, %r13
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	32(%rbp), %r14d
	movl	%ebx, %edx
	callq	_avio_write
	movl	(%r15), %eax
	incl	%eax
	movl	%eax, (%r15)
	movq	_RTP_FLAG_MARKER@GOTPCREL(%rip), %rcx
	testl	%r14d, (%rcx)
	je	LBB0_20
## %bb.22:
	cmpl	4(%r15), %eax
	jne	LBB0_23
## %bb.24:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_ff_rtp_finalize_packet
	movl	%eax, %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jns	LBB0_26
## %bb.25:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movl	%ebx, %eax
	jmp	LBB0_26
LBB0_6:
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.9:
	movq	%rsi, %r13
	movq	%rdx, %r15
	movq	%r8, %r14
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_av_new_packet
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_18:
	movq	%rcx, %rdi
	movq	%r8, %rbx
	callq	_ffio_free_dyn_buf
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%rbx, %rdi
	jmp	LBB0_8
LBB0_15:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r8, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_20:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r8, %rdi
LBB0_8:
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_3
LBB0_11:
	movl	(%r15), %eax
	movl	%eax, 4(%r12)
	movl	(%r12), %edi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_23:
	movq	%r13, %rdi
	callq	_ffio_free_dyn_buf
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %ecx
	subl	(%r15), %ecx
	leaq	L_.str.5(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_RTP_AC3_PAYLOAD_HEADER_SIZE,4,2 ## @RTP_AC3_PAYLOAD_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid %d bytes packet\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid AC3 packet data\n"

L_.str.2:                               ## @.str.2
	.asciz	"Out of memory.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"Received packet without a start fragment; dropping.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Invalid packet received\n"

	.comm	_RTP_FLAG_MARKER,4,2            ## @RTP_FLAG_MARKER
L_.str.5:                               ## @.str.5
	.asciz	"Missed %d packets\n"

L_.str.6:                               ## @.str.6
	.asciz	"Error occurred when getting fragment buffer.\n"

	.no_dead_strip	_ac3_handle_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ac3_handle_packet
_ac3_handle_packet:                     ; @ac3_handle_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
                                        ; kill: def $w6 killed $w6 def $x6
	mov	x19, x0
Lloh0:
	adrp	x8, _RTP_AC3_PAYLOAD_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTP_AC3_PAYLOAD_HEADER_SIZE@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	cmp	w8, w6
	b.ge	LBB0_4
; %bb.1:
	mov	x25, x4
	mov	x20, x1
	ldp	w9, w27, [x5]
	and	w9, w9, #0x3
	add	x24, x5, x8, lsl #2
	sub	w23, w6, w8
	sub	w8, w9, #1
	cmp	w8, #2
	b.hs	LBB0_7
; %bb.2:
	add	x19, x20, #8
	mov	x0, x19
	bl	_ffio_free_dyn_buf
	mov	w8, #1
	stp	w8, w27, [x20]
	mov	x0, x19
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_18
; %bb.3:
	ldr	w0, [x20, #8]
	mov	x1, x24
	mov	x2, x23
	bl	_avio_write
	ldr	w8, [x25]
	str	w8, [x20, #12]
	b	LBB0_21
LBB0_4:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	str	x6, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	mov	x21, x3
	mov	x22, x2
	cmp	w9, #3
	b.ne	LBB0_15
; %bb.8:
	mov	x26, x20
	ldr	w0, [x26, #8]!
	cbz	w0, LBB0_20
; %bb.9:
	ldr	w8, [x20, #4]
	cmp	w27, w8
	b.ne	LBB0_19
; %bb.10:
	ldr	w8, [x20, #12]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.11:
	ldr	w25, [x29, #16]
	mov	x1, x24
	mov	x2, x23
	bl	_avio_write
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
Lloh11:
	adrp	x9, _RTP_FLAG_MARKER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RTP_FLAG_MARKER@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w25
	b.eq	LBB0_21
; %bb.12:
	ldr	w9, [x20, #4]
	cmp	w8, w9
	b.ne	LBB0_25
; %bb.13:
	ldr	w2, [x22]
	mov	x0, x21
	mov	x1, x26
	bl	_ff_rtp_finalize_packet
	tbnz	w0, #31, LBB0_26
; %bb.14:
	mov	w21, #0
	b	LBB0_6
LBB0_15:
	cbz	w27, LBB0_23
; %bb.16:
	mov	x0, x21
	mov	x1, x23
	bl	_av_new_packet
	cbz	w0, LBB0_24
; %bb.17:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_22
LBB0_18:
	mov	x21, x0
	b	LBB0_6
LBB0_19:
	mov	x0, x26
	bl	_ffio_free_dyn_buf
Lloh21:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x2, l_.str.4@PAGE
Lloh25:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_20:
Lloh26:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x2, l_.str.3@PAGE
Lloh30:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_21:
Lloh31:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
LBB0_23:
Lloh33:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x2, l_.str.1@PAGE
Lloh37:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_24:
	ldr	w8, [x22]
	str	w8, [x21, #4]
	ldr	w0, [x21]
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	mov	w21, #0
	b	LBB0_6
LBB0_25:
	mov	x0, x26
	bl	_ffio_free_dyn_buf
Lloh38:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldp	w9, w8, [x20]
	sub	w8, w8, w9
	str	x8, [sp]
Lloh41:
	adrp	x2, l_.str.5@PAGE
Lloh42:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_5
LBB0_26:
	mov	x21, x0
Lloh43:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x2, l_.str.6@PAGE
Lloh47:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_RTP_AC3_PAYLOAD_HEADER_SIZE,4,2 ; @RTP_AC3_PAYLOAD_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid %d bytes packet\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid AC3 packet data\n"

l_.str.2:                               ; @.str.2
	.asciz	"Out of memory.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"Received packet without a start fragment; dropping.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Invalid packet received\n"

	.comm	_RTP_FLAG_MARKER,4,2            ; @RTP_FLAG_MARKER
l_.str.5:                               ; @.str.5
	.asciz	"Missed %d packets\n"

l_.str.6:                               ; @.str.6
	.asciz	"Error occurred when getting fragment buffer.\n"

	.no_dead_strip	_ac3_handle_packet
.subsections_via_symbols
