	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function latm_decode_extradata
_latm_decode_extradata:                 ## @latm_decode_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_MAX_EXTRADATA_SIZE@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jge	LBB0_4
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_4:
	movq	(%rbx), %r14
	leaq	-32(%rbp), %rdi
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_avpriv_mpeg4audio_get_config2
	movl	%eax, (%r14)
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	_AOT_ALS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpq	%rdx, 8(%r14)
	jne	LBB0_8
## %bb.6:
	andl	$7, %eax
	je	LBB0_8
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	-32(%rbp), %rcx
	movq	_AOT_SBR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jle	LBB0_11
## %bb.9:
	cmpq	%rdx, %rcx
	je	LBB0_11
## %bb.10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_3
LBB0_11:
	movl	-24(%rbp), %eax
	movl	%eax, 16(%r14)
	movq	%rcx, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_EXTRADATA_SIZE,4,2         ## @MAX_EXTRADATA_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Extradata is larger than currently supported.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AOT_ALS,8,3                    ## @AOT_ALS
L_.str.1:                               ## @.str.1
	.asciz	"BUG: ALS offset is not byte-aligned\n"

	.comm	_AOT_SBR,8,3                    ## @AOT_SBR
L_.str.2:                               ## @.str.2
	.asciz	"Muxing MPEG-4 AOT %d in LATM is not supported\n"

	.no_dead_strip	_latm_decode_extradata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function latm_decode_extradata
_latm_decode_extradata:                 ; @latm_decode_extradata
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX_EXTRADATA_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_EXTRADATA_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ge	LBB0_2
; %bb.1:
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_8
LBB0_2:
	ldr	x20, [x19]
	add	x0, sp, #16
	mov	w3, #1
	mov	x4, x19
	bl	_avpriv_mpeg4audio_get_config2
	str	w0, [x20]
	tbnz	w0, #31, LBB0_9
; %bb.3:
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _AOT_ALS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AOT_ALS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	and	w10, w0, #0x7
	cmp	x8, x9
	ccmp	w10, #0, #4, eq
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [sp, #16]
Lloh11:
	adrp	x10, _AOT_SBR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _AOT_SBR@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, gt
	b.ne	LBB0_7
; %bb.5:
	mov	w0, #0
	ldr	w9, [sp, #24]
	str	w9, [x20, #16]
	str	x8, [x20, #8]
	b	LBB0_9
LBB0_6:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh19:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_av_log
Lloh24:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.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 AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_EXTRADATA_SIZE,4,2         ; @MAX_EXTRADATA_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Extradata is larger than currently supported.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AOT_ALS,8,3                    ; @AOT_ALS
l_.str.1:                               ; @.str.1
	.asciz	"BUG: ALS offset is not byte-aligned\n"

	.comm	_AOT_SBR,8,3                    ; @AOT_SBR
l_.str.2:                               ; @.str.2
	.asciz	"Muxing MPEG-4 AOT %d in LATM is not supported\n"

	.no_dead_strip	_latm_decode_extradata
.subsections_via_symbols
