	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function latm_decode_frame
_latm_decode_frame:                     ## @latm_decode_frame
	.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	%rcx, %r14
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	16(%rdi), %r15
	movl	(%rcx), %edx
	movl	4(%rcx), %esi
	leaq	-44(%rbp), %rdi
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	leaq	-44(%rbp), %rdi
	movl	$11, %esi
	callq	_get_bits
	movq	_LOAS_SYNC_WORD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.2:
	leaq	-44(%rbp), %rdi
	movl	$13, %esi
	callq	_get_bits
	movl	%eax, %ebx
	addl	$3, %ebx
	cmpl	(%r14), %ebx
	jle	LBB0_6
LBB0_3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_6:
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_read_audio_mux_element
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	js	LBB0_4
## %bb.8:
	movl	(%r14), %ebx
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	$0, (%r15)
	je	LBB0_15
LBB0_10:
	leaq	-44(%rbp), %rdi
	movl	$12, %esi
	callq	_show_bits
	cmpl	$4095, %eax                     ## imm = 0xFFF
	jne	LBB0_13
## %bb.11:
	movl	16(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	jmp	LBB0_3
LBB0_13:
	movq	8(%r15), %rax
	movl	4(%rax), %eax
	andl	$-4, %eax
	leaq	-44(%rbp), %rcx
	movq	%r13, %rdi
	movq	%r12, %rsi
	cmpl	$128, %eax
	jne	LBB0_18
## %bb.14:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_aac_decode_er_frame
	jmp	LBB0_19
LBB0_15:
	cmpl	$0, 8(%r13)
	je	LBB0_20
## %bb.16:
	leaq	8(%r15), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_push_output_configuration
	movq	8(%r15), %rdx
	addq	$4, %rdx
	movl	8(%r13), %ecx
	movq	(%r13), %r8
	shlq	$3, %r8
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	$1, %r9d
	callq	_decode_audio_specific_config
	testl	%eax, %eax
	js	LBB0_21
## %bb.17:
	movl	$1, (%r15)
	jmp	LBB0_10
LBB0_18:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %r8
	callq	_aac_decode_frame_int
LBB0_19:
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	jmp	LBB0_5
LBB0_20:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movl	(%r14), %ebx
	jmp	LBB0_5
LBB0_21:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ebx
	callq	_pop_output_configuration
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_LOAS_SYNC_WORD,4,2             ## @LOAS_SYNC_WORD
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADTS header detected, probably as result of configuration misparsing\n"

	.no_dead_strip	_latm_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function latm_decode_frame
_latm_decode_frame:                     ; @latm_decode_frame
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x23, [x0, #16]
	ldp	w2, w1, [x3]
	add	x0, sp, #12
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_4
; %bb.1:
	add	x0, sp, #12
	mov	w1, #11
	bl	_get_bits
Lloh0:
	adrp	x8, _LOAS_SYNC_WORD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOAS_SYNC_WORD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
	add	x0, sp, #12
	mov	w1, #13
	bl	_get_bits
	add	w26, w0, #3
	ldr	w8, [x19]
	cmp	w26, w8
	b.le	LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	b	LBB0_5
LBB0_4:
	mov	x24, x0
LBB0_5:
	mov	x0, x24
	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_6:
	add	x1, sp, #12
	mov	x0, x23
	bl	_read_audio_mux_element
	cbz	w0, LBB0_9
; %bb.7:
	mov	x24, x0
	tbnz	w0, #31, LBB0_5
; %bb.8:
	ldr	w24, [x19]
	b	LBB0_5
LBB0_9:
	ldr	w8, [x23]
	cbz	w8, LBB0_14
LBB0_10:
	add	x0, sp, #12
	mov	w1, #12
	bl	_show_bits
	cmp	w0, #4095
	b.ne	LBB0_12
; %bb.11:
	ldr	w0, [x23, #16]
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	b	LBB0_3
LBB0_12:
	ldr	x8, [x23, #8]
	ldr	w8, [x8, #4]
	and	w8, w8, #0xfffffffc
	add	x3, sp, #12
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	cmp	w8, #128
	b.ne	LBB0_17
; %bb.13:
	bl	_aac_decode_er_frame
	b	LBB0_18
LBB0_14:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_19
; %bb.15:
	add	x25, x23, #8
	mov	x0, x25
	bl	_push_output_configuration
	ldr	x8, [x23, #8]
	add	x2, x8, #4
	ldr	w3, [x22, #8]
	ldr	x8, [x22]
	lsl	x4, x8, #3
	mov	w27, #1
	mov	x0, x25
	mov	x1, x22
	mov	w5, #1
	bl	_decode_audio_specific_config
	tbnz	w0, #31, LBB0_20
; %bb.16:
	str	w27, [x23]
	b	LBB0_10
LBB0_17:
	mov	x4, x19
	bl	_aac_decode_frame_int
LBB0_18:
	cmp	w0, #0
	csel	w24, w0, w26, lt
	b	LBB0_5
LBB0_19:
	str	wzr, [x20]
	ldr	w24, [x19]
	b	LBB0_5
LBB0_20:
	mov	x24, x0
	mov	x0, x25
	bl	_pop_output_configuration
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LOAS_SYNC_WORD,4,2             ; @LOAS_SYNC_WORD
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADTS header detected, probably as result of configuration misparsing\n"

	.no_dead_strip	_latm_decode_frame
.subsections_via_symbols
