	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aac_adtstoasc_filter
_aac_adtstoasc_filter:                  ## @aac_adtstoasc_filter
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r15
	callq	_ff_bsf_get_packet_ref
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	cmpl	$2, (%r14)
	jl	LBB0_5
## %bb.4:
	movl	4(%r14), %edi
	callq	_AV_RB16
	andl	$-16, %eax
	xorl	%ebx, %ebx
	cmpl	$65520, %eax                    ## imm = 0xFFF0
	jne	LBB0_26
LBB0_5:
	movq	_AV_AAC_ADTS_HEADER_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	cmpl	%edx, (%r14)
	jge	LBB0_6
LBB0_22:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_23
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_6:
	movl	4(%r14), %esi
	shll	$3, %edx
	leaq	-52(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_init_get_bits
	leaq	-104(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ff_adts_header_parse
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	movl	-88(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	cmpl	$2, -104(%rbp)
	jl	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_avpriv_report_missing_feature
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_23:
	movq	%r13, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %ebx
LBB0_25:
	movq	%r14, %rdi
	callq	_av_packet_unref
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.27:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	addl	%ecx, %ecx
	subl	(%r12), %ecx
	movl	(%r14), %edx
	addl	%edx, %ecx
	addl	$-2, %ecx
	movl	%ecx, (%r14)
	testl	%ecx, %ecx
	jle	LBB0_22
## %bb.12:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	addl	%ecx, %ecx
	addl	(%r12), %ecx
	addl	%ecx, 4(%r14)
	xorl	%ebx, %ebx
	cmpl	$0, (%r15)
	jne	LBB0_26
## %bb.13:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_MAX_PCE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	cmpl	$0, -100(%rbp)
	jne	LBB0_17
## %bb.14:
	movq	%rbx, %r12
	movl	(%r14), %edx
	movl	4(%r14), %esi
	shll	$3, %edx
	leaq	-52(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_init_get_bits
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_get_bits
	cmpl	$5, %eax
	jne	LBB0_15
## %bb.16:
	movl	(%r12), %edx
	leaq	-68(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_init_put_bits
	leaq	-52(%rbp), %r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ff_copy_pce_data
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	sarl	$3, %r12d
	movq	%rbx, %rdi
	callq	_flush_put_bits
	movq	%r13, %rdi
	callq	_get_bits_count
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	subl	%ecx, (%r14)
	movq	%r13, %rdi
	callq	_get_bits_count
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	addl	%ecx, 4(%r14)
LBB0_17:
	movq	_AV_PKT_DATA_NEW_EXTRADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	2(%r12), %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	%rax, %r13
	leaq	-68(%rbp), %r14
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_init_put_bits
	movl	-92(%rbp), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_put_bits
	movl	-96(%rbp), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_put_bits
	movl	-100(%rbp), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_put_bits
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r14, %rdi
	callq	_flush_put_bits
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.20:
	addq	$8, %r13
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy
LBB0_21:
	movl	$1, (%r15)
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_15:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_avpriv_report_missing_feature
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_AAC_ADTS_HEADER_SIZE,4,2    ## @AV_AAC_ADTS_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error parsing ADTS frame header!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Multiple RDBs per frame with CRC"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_MAX_PCE_SIZE,4,2               ## @MAX_PCE_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"PCE-based channel configuration without PCE as first syntax element"

	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ## @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Input packet too small\n"

	.no_dead_strip	_aac_adtstoasc_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aac_adtstoasc_filter
_aac_adtstoasc_filter:                  ; @aac_adtstoasc_filter
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #48
	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, #-72]
	ldr	x24, [x0, #8]
	bl	_ff_bsf_get_packet_ref
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_AV_RB16
	lsr	w8, w0, #4
	cmp	w8, #4095
	b.ne	LBB0_17
LBB0_4:
	ldr	w9, [x19]
Lloh3:
	adrp	x20, _AV_AAC_ADTS_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AV_AAC_ADTS_HEADER_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w9, w8
	b.ge	LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.3@PAGE
Lloh9:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_6:
	mov	x20, x0
	b	LBB0_18
LBB0_7:
	ldr	w1, [x19, #4]
	lsl	w2, w8, #3
	sub	x0, x29, #76
	bl	_init_get_bits
	sub	x0, x29, #76
	sub	x1, x29, #104
	bl	_ff_adts_header_parse
	tbnz	x0, #63, LBB0_11
; %bb.8:
	ldur	w8, [x29, #-88]
	cbnz	w8, LBB0_15
; %bb.9:
	ldur	w9, [x29, #-104]
	cmp	w9, #1
	b.le	LBB0_15
; %bb.10:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_avpriv_report_missing_feature
Lloh12:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
LBB0_12:
	mov	x0, x21
	bl	_av_log
Lloh19:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_13:
	ldr	w20, [x8]
LBB0_14:
	mov	x0, x19
	bl	_av_packet_unref
	b	LBB0_18
LBB0_15:
	ldr	w9, [x20]
	mov	w10, #-2
	cmp	w8, #0
	csel	w10, w10, wzr, eq
	ldr	w11, [x19]
	sub	w9, w10, w9
	add	w9, w9, w11
	str	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.16:
	cmp	w8, #0
	cset	w8, eq
	ldr	w9, [x20]
	add	w8, w9, w8, lsl #1
	ldr	w9, [x19, #4]
	add	w8, w8, w9
	str	w8, [x19, #4]
	ldr	w8, [x24]
	cbz	w8, LBB0_20
LBB0_17:
	mov	w20, #0
LBB0_18:
	ldur	x8, [x29, #-72]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.19:
	mov	x0, x20
	sub	sp, x29, #64
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	x25, sp
Lloh24:
	adrp	x22, _MAX_PCE_SIZE@GOTPAGE
Lloh25:
	ldr	x22, [x22, _MAX_PCE_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh26:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh27:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldur	w8, [x29, #-100]
	cbz	w8, LBB0_22
; %bb.21:
	mov	w21, #0
	b	LBB0_24
LBB0_22:
	ldp	w8, w1, [x19]
	lsl	w2, w8, #3
	sub	x0, x29, #76
	bl	_init_get_bits
	sub	x0, x29, #76
	mov	w1, #3
	bl	_get_bits
	cmp	w0, #5
	b.ne	LBB0_29
; %bb.23:
	ldr	w2, [x22]
	sub	x0, x29, #80
	mov	x1, x20
	bl	_init_put_bits
	sub	x0, x29, #80
	sub	x1, x29, #76
	bl	_ff_copy_pce_data
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w21, w8, #3
	sub	x0, x29, #80
	bl	_flush_put_bits
	sub	x0, x29, #76
	bl	_get_bits_count
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	ldr	w9, [x19]
	sub	w8, w9, w8, asr #3
	str	w8, [x19]
	sub	x0, x29, #76
	bl	_get_bits_count
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	ldr	w9, [x19, #4]
	add	w8, w9, w8, asr #3
	str	w8, [x19, #4]
LBB0_24:
Lloh28:
	adrp	x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	w23, w21, #2
	mov	x0, x19
	mov	x2, x23
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_28
; %bb.25:
	mov	x22, x0
	sub	x0, x29, #80
	mov	x1, x22
	mov	x2, x23
	bl	_init_put_bits
	ldur	w2, [x29, #-92]
	sub	x0, x29, #80
	mov	w1, #5
	bl	_put_bits
	ldur	w2, [x29, #-96]
	sub	x0, x29, #80
	mov	w1, #4
	bl	_put_bits
	ldur	w2, [x29, #-100]
	sub	x0, x29, #80
	mov	w1, #4
	bl	_put_bits
	mov	w19, #1
	sub	x0, x29, #80
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	sub	x0, x29, #80
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	sub	x0, x29, #80
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	sub	x0, x29, #80
	bl	_flush_put_bits
	cbz	w21, LBB0_27
; %bb.26:
	add	x0, x22, #8
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
LBB0_27:
	str	w19, [x24]
	mov	sp, x25
	mov	w20, #0
	b	LBB0_18
LBB0_28:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	mov	sp, x25
	b	LBB0_14
LBB0_29:
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_avpriv_report_missing_feature
Lloh36:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
Lloh38:
	ldr	w20, [x8]
	mov	sp, x25
	b	LBB0_14
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_AAC_ADTS_HEADER_SIZE,4,2    ; @AV_AAC_ADTS_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error parsing ADTS frame header!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Multiple RDBs per frame with CRC"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_MAX_PCE_SIZE,4,2               ; @MAX_PCE_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"PCE-based channel configuration without PCE as first syntax element"

	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ; @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Input packet too small\n"

	.no_dead_strip	_aac_adtstoasc_filter
.subsections_via_symbols
