	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function latm_parse_packet
_latm_parse_packet:                     ## @latm_parse_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r13
	testq	%r9, %r9
	je	LBB0_9
## %bb.1:
	movq	%r9, %rbx
	movq	%r8, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	32(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %r15d
	movq	32(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	(%r13), %rax
	cmpq	(%r14), %rax
	je	LBB0_5
LBB0_3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	32(%r13), %r12
	leaq	8(%r13), %rdi
	callq	_av_freep
	movq	%r12, %rdi
	callq	_ffio_free_dyn_buf
	movq	(%r14), %rax
	movq	%rax, (%r13)
	movq	%r12, %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_20
## %bb.4:
	movq	(%r12), %rdi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_5:
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_avio_write
	movq	_RTP_FLAG_MARKER@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.8:
	leaq	8(%r13), %rbx
	movq	%rbx, %rdi
	callq	_av_freep
	movq	32(%r13), %rdi
	movq	%rbx, %rsi
	callq	_avio_close_dyn_buf
	movq	%rax, 16(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r13)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_9:
	movq	8(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.10:
	movq	16(%r13), %r8
	movq	24(%r13), %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r8, %rsi
	jge	LBB0_12
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	1(%rsi), %rdx
	movq	%rdx, 24(%r13)
	movl	(%rcx,%rsi,4), %eax
	addl	%eax, %ebx
	movq	%rdx, %rsi
	cmpl	$255, %eax
	je	LBB0_11
	jmp	LBB0_16
LBB0_13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_14
LBB0_12:
	movq	%rsi, %rdx
LBB0_16:
	movslq	%ebx, %r14
	addq	%r14, %rdx
	cmpq	%r8, %rdx
	jle	LBB0_18
## %bb.17:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_14:
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_18:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_20
## %bb.19:
	movl	4(%r12), %edi
	movq	24(%r13), %rsi
	shlq	$2, %rsi
	addq	8(%r13), %rsi
	movl	%ebx, %edx
	callq	_memcpy
	addq	24(%r13), %r14
	movq	%r14, 24(%r13)
	movl	(%r15), %eax
	movl	%eax, (%r12)
	xorl	%eax, %eax
	cmpq	16(%r13), %r14
	setl	%al
LBB0_20:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTP_FLAG_MARKER,4,2            ## @RTP_FLAG_MARKER
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No data available yet\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Malformed LATM packet\n"

	.no_dead_strip	_latm_parse_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function latm_parse_packet
_latm_parse_packet:                     ; @latm_parse_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	cbz	x5, LBB0_7
; %bb.1:
	mov	x23, x6
	mov	x24, x5
	mov	x25, x4
	ldr	w27, [x29, #16]
	mov	x26, x21
	ldr	x0, [x26, #32]!
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x21]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_5
LBB0_3:
	add	x0, x21, #8
	bl	_av_freep
	mov	x0, x26
	bl	_ffio_free_dyn_buf
	ldr	x8, [x25]
	str	x8, [x21]
	mov	x0, x26
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_18
; %bb.4:
	ldr	x0, [x26]
LBB0_5:
	mov	x1, x24
	mov	x2, x23
	bl	_avio_write
Lloh0:
	adrp	x8, _RTP_FLAG_MARKER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTP_FLAG_MARKER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w27
	b.eq	LBB0_19
; %bb.6:
	add	x23, x21, #8
	mov	x0, x23
	bl	_av_freep
	ldr	x0, [x21, #32]
	mov	x1, x23
	bl	_avio_close_dyn_buf
	stp	xzr, xzr, [x21, #24]
	str	x0, [x21, #16]
LBB0_7:
	ldr	x10, [x21, #8]
	cbz	x10, LBB0_11
; %bb.8:
	mov	w9, #0
	ldp	x8, x12, [x21, #16]
	cmp	x12, x8
	csel	x11, x12, x8, gt
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x11, x12
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x13, x12, #1
	str	x13, [x21, #24]
	ldr	w14, [x10, x12, lsl #2]
	add	w9, w14, w9
	mov	x12, x13
	cmp	w14, #255
	b.eq	LBB0_9
	b	LBB0_13
LBB0_11:
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_15
LBB0_12:
	mov	x13, x11
LBB0_13:
	sxtw	x23, w9
	add	x9, x13, x23
	cmp	x9, x8
	b.le	LBB0_16
; %bb.14:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_15:
	mov	x0, x22
	bl	_av_log
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_20
LBB0_16:
	mov	x0, x19
	mov	x1, x23
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_18
; %bb.17:
	ldr	w0, [x19, #4]
	ldr	x8, [x21, #8]
	ldr	x9, [x21, #24]
	add	x1, x8, x9, lsl #2
	mov	x2, x23
	bl	_memcpy
	ldp	x9, x8, [x21, #16]
	add	x8, x8, x23
	cmp	x8, x9
	str	x8, [x21, #24]
	ldr	w8, [x20]
	str	w8, [x19]
	cset	w0, lt
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh15:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_20:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RTP_FLAG_MARKER,4,2            ; @RTP_FLAG_MARKER
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No data available yet\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Malformed LATM packet\n"

	.no_dead_strip	_latm_parse_packet
.subsections_via_symbols
