	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_adts_extradata
_parse_adts_extradata:                  ## @parse_adts_extradata
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	$0, -40(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_av_bsf_get_by_name
	leaq	-40(%rbp), %rsi
	movq	%rax, %rdi
	callq	_av_bsf_alloc
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-40(%rbp), %rax
	movl	$1, 4(%rax)
	movl	16(%r14), %ecx
	movl	%ecx, 8(%rax)
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_avcodec_parameters_from_context
	movq	-40(%rbp), %rdi
	callq	_av_bsf_init
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	-40(%rbp), %rdi
	movq	%r15, %rsi
	callq	_av_bsf_send_packet
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	-40(%rbp), %rdi
	movq	%r15, %rsi
	callq	_av_bsf_receive_packet
	movl	%eax, %r12d
	leaq	-40(%rbp), %rdi
	callq	_av_bsf_free
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	xorl	%ebx, %ebx
	cmpl	%eax, %r12d
	je	LBB0_17
## %bb.8:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_17
## %bb.9:
	testl	%r12d, %r12d
	js	LBB0_10
## %bb.13:
	cmpq	$0, (%r14)
	jne	LBB0_17
## %bb.14:
	movq	_AV_PKT_DATA_NEW_EXTRADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_av_packet_get_side_data
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movl	-44(%rbp), %edi
	testl	%edi, %edi
	jle	LBB0_17
## %bb.16:
	movq	%rax, %r15
	movq	_HB_CONFIG_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MIN
	movl	%eax, %r12d
	movl	8(%r14), %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movslq	%r12d, %rax
	movq	%rax, (%r14)
	jmp	LBB0_17
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_error
	jmp	LBB0_17
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_6:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	callq	_hb_error
	leaq	-40(%rbp), %rdi
	callq	_av_bsf_free
LBB0_17:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_12
## %bb.11:
	movl	%r12d, %ebx
	jmp	LBB0_17
LBB0_12:
	movl	%r12d, %esi
	negl	%esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_error
	movl	%r12d, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aac_adtstoasc"

L_.str.1:                               ## @.str.1
	.asciz	"decavcodec: bitstream filter alloc failure"

L_.str.2:                               ## @.str.2
	.asciz	"decavcodec: bitstream filter init failure"

L_.str.3:                               ## @.str.3
	.asciz	"decavcodec: av_bsf_send_packet failure"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.4:                               ## @.str.4
	.asciz	"decavcodec: av_bsf_receive_packet failure %x"

	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ## @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_HB_CONFIG_MAX_SIZE,4,2         ## @HB_CONFIG_MAX_SIZE
	.no_dead_strip	_parse_adts_extradata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_adts_extradata
_parse_adts_extradata:                  ; @parse_adts_extradata
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x22, x1
	mov	x19, x0
	str	xzr, [sp, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_av_bsf_get_by_name
	add	x1, sp, #24
	bl	_av_bsf_alloc
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldr	x8, [sp, #24]
	mov	w9, #1
	ldr	w10, [x19, #16]
	stp	w9, w10, [x8, #4]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_avcodec_parameters_from_context
	ldr	x0, [sp, #24]
	bl	_av_bsf_init
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	x0, [sp, #24]
	mov	x1, x21
	bl	_av_bsf_send_packet
	tbnz	w0, #31, LBB0_12
; %bb.3:
	ldr	x0, [sp, #24]
	mov	x1, x21
	bl	_av_bsf_receive_packet
	mov	x20, x0
	add	x0, sp, #24
	bl	_av_bsf_free
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_AVERROR
Lloh5:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w20, w0
	ccmp	w20, w8, #4, ne
	b.eq	LBB0_9
; %bb.4:
	tbnz	w20, #31, LBB0_15
; %bb.5:
	ldr	x8, [x19]
	cbnz	x8, LBB0_9
; %bb.6:
Lloh8:
	adrp	x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #20
	mov	x0, x21
	bl	_av_packet_get_side_data
	cbz	x0, LBB0_9
; %bb.7:
	mov	x20, x0
	ldr	w0, [sp, #20]
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _HB_CONFIG_MAX_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HB_CONFIG_MAX_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_MIN
	mov	x21, x0
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	sxtw	x8, w21
	str	x8, [x19]
LBB0_9:
	mov	w20, #0
	b	LBB0_14
LBB0_10:
	mov	x20, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_hb_error
	b	LBB0_14
LBB0_11:
	mov	x20, x0
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
	mov	x20, x0
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	bl	_hb_error
	add	x0, sp, #24
	bl	_av_bsf_free
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
Lloh20:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w20, w8
	b.eq	LBB0_14
; %bb.16:
	neg	w8, w20
	str	x8, [sp]
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_hb_error
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aac_adtstoasc"

l_.str.1:                               ; @.str.1
	.asciz	"decavcodec: bitstream filter alloc failure"

l_.str.2:                               ; @.str.2
	.asciz	"decavcodec: bitstream filter init failure"

l_.str.3:                               ; @.str.3
	.asciz	"decavcodec: av_bsf_send_packet failure"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.4:                               ; @.str.4
	.asciz	"decavcodec: av_bsf_receive_packet failure %x"

	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ; @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_HB_CONFIG_MAX_SIZE,4,2         ; @HB_CONFIG_MAX_SIZE
	.no_dead_strip	_parse_adts_extradata
.subsections_via_symbols
