	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_xxch_frame
_parse_xxch_frame:                      ## @parse_xxch_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	16(%rdi), %r13
	movq	%r13, %rdi
	callq	_get_bits_count
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	$32, %esi
	callq	_get_bits_long
	movq	_DCA_SYNCWORD_XXCH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	movl	$6, %esi
	callq	_get_bits
                                        ## kill: def $eax killed $eax def $rax
	movl	12(%r14), %edi
	movl	%ebx, %edx
	addl	$32, %edx
	leal	(%rbx,%rax,8), %r15d
	addl	$8, %r15d
	movq	%r13, %rsi
	movl	%r15d, %ecx
	callq	_ff_dca_check_crc
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	12(%r14), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_22
LBB0_1:
	movl	12(%r14), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_22:
	xorl	%eax, %eax
	callq	_av_log
LBB0_23:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r13, %rdi
	callq	_get_bits1
	movl	%eax, 24(%r14)
	movq	%r13, %rdi
	movl	$5, %esi
	callq	_get_bits
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %ecx
	movl	%ecx, (%r14)
	movq	_DCA_SPEAKER_Cs@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jge	LBB0_6
## %bb.5:
	movl	12(%r14), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_23
LBB0_6:
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_get_bits
	testl	%eax, %eax
	jle	LBB0_8
## %bb.7:
	incl	%eax
	movl	12(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_avpriv_request_sample
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_8:
	movq	%r13, %rdi
	movl	$14, %esi
	callq	_get_bits
	movl	%eax, %r12d
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_get_bits_long
	movl	%eax, 4(%r14)
	movl	8(%r14), %r8d
	movq	_DCA_SPEAKER_MASK_Ls@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%r8d, %ecx
	je	LBB0_11
## %bb.9:
	movq	_DCA_SPEAKER_MASK_Lss@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, %edx
	je	LBB0_11
## %bb.10:
	notl	%ecx
	andl	%ecx, %r8d
	orl	%edx, %r8d
LBB0_11:
	movq	_DCA_SPEAKER_MASK_Rs@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%r8d, %ecx
	je	LBB0_14
## %bb.12:
	movq	_DCA_SPEAKER_MASK_Rss@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, %edx
	je	LBB0_14
## %bb.13:
	notl	%ecx
	andl	%ecx, %r8d
	orl	%edx, %r8d
LBB0_14:
	cmpl	%eax, %r8d
	jne	LBB0_15
## %bb.16:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ff_dca_seek_bits
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	12(%r14), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_22
LBB0_15:
	movl	12(%r14), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.4(%rip), %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_23
LBB0_18:
	movq	_HEADER_XXCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%r14), %edx
	movq	%r14, %rdi
	callq	_parse_frame_data
	testl	%eax, %eax
	js	LBB0_25
## %bb.19:
	leal	(%r15,%r12,8), %esi
	addl	$8, %esi
	movq	%r13, %rdi
	callq	_ff_dca_seek_bits
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:
	movl	12(%r14), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	jmp	LBB0_22
LBB0_20:
	xorl	%eax, %eax
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_DCA_SYNCWORD_XXCH,8,3          ## @DCA_SYNCWORD_XXCH
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid XXCH sync word\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid XXCH frame header checksum\n"

	.comm	_DCA_SPEAKER_Cs,4,2             ## @DCA_SPEAKER_Cs
L_.str.2:                               ## @.str.2
	.asciz	"Invalid number of bits for XXCH speaker mask (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"%d XXCH channel sets"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_DCA_SPEAKER_MASK_Ls,4,2        ## @DCA_SPEAKER_MASK_Ls
	.comm	_DCA_SPEAKER_MASK_Lss,4,2       ## @DCA_SPEAKER_MASK_Lss
	.comm	_DCA_SPEAKER_MASK_Rs,4,2        ## @DCA_SPEAKER_MASK_Rs
	.comm	_DCA_SPEAKER_MASK_Rss,4,2       ## @DCA_SPEAKER_MASK_Rss
L_.str.4:                               ## @.str.4
	.asciz	"XXCH core speaker activity mask (%#x) disagrees with core (%#x)\n"

L_.str.5:                               ## @.str.5
	.asciz	"Read past end of XXCH frame header\n"

	.comm	_HEADER_XXCH,4,2                ## @HEADER_XXCH
L_.str.6:                               ## @.str.6
	.asciz	"Read past end of XXCH channel set\n"

	.no_dead_strip	_parse_xxch_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_xxch_frame
_parse_xxch_frame:                      ; @parse_xxch_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	add	x20, x0, #16
	mov	x0, x20
	bl	_get_bits_count
	mov	x21, x0
	mov	x0, x20
	mov	w1, #32
	bl	_get_bits_long
Lloh0:
	adrp	x8, _DCA_SYNCWORD_XXCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DCA_SYNCWORD_XXCH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x20
	mov	w1, #6
	bl	_get_bits
	ldr	w8, [x19, #12]
	add	w2, w21, #32
	add	w9, w21, w0, lsl #3
	add	w21, w9, #8
	mov	x0, x8
	mov	x1, x20
	mov	x3, x21
	bl	_ff_dca_check_crc
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w0, [x19, #12]
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #12]
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
LBB0_4:
	bl	_av_log
Lloh13:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	mov	x0, x20
	bl	_get_bits1
	str	w0, [x19, #24]
	mov	x0, x20
	mov	w1, #5
	bl	_get_bits
	add	w8, w0, #1
	str	w8, [x19]
Lloh15:
	adrp	x9, _DCA_SPEAKER_Cs@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DCA_SPEAKER_Cs@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w0, w9
	b.ge	LBB0_9
; %bb.8:
	ldr	w0, [x19, #12]
Lloh18:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh21:
	adrp	x2, l_.str.2@PAGE
Lloh22:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_9:
	mov	x0, x20
	mov	w1, #2
	bl	_get_bits
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.10:
	add	w2, w0, #1
	ldr	w0, [x19, #12]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_avpriv_request_sample
Lloh25:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_5
LBB0_11:
	mov	x0, x20
	mov	w1, #14
	bl	_get_bits
	mov	x22, x0
	ldr	w1, [x19]
	mov	x0, x20
	bl	_get_bits_long
	str	w0, [x19, #4]
	ldr	w9, [x19, #8]
Lloh27:
	adrp	x8, _DCA_SPEAKER_MASK_Ls@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DCA_SPEAKER_MASK_Ls@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_13
; %bb.12:
Lloh30:
	adrp	x10, _DCA_SPEAKER_MASK_Lss@GOTPAGE
Lloh31:
	ldr	x10, [x10, _DCA_SPEAKER_MASK_Lss@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
	tst	w10, w0
	bic	w8, w9, w8
	orr	w8, w10, w8
	csel	w9, w9, w8, eq
LBB0_13:
Lloh33:
	adrp	x8, _DCA_SPEAKER_MASK_Rs@GOTPAGE
Lloh34:
	ldr	x8, [x8, _DCA_SPEAKER_MASK_Rs@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_15
; %bb.14:
Lloh36:
	adrp	x10, _DCA_SPEAKER_MASK_Rss@GOTPAGE
Lloh37:
	ldr	x10, [x10, _DCA_SPEAKER_MASK_Rss@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	tst	w10, w0
	bic	w8, w9, w8
	orr	w8, w10, w8
	csel	w9, w9, w8, eq
LBB0_15:
	cmp	w9, w0
	b.ne	LBB0_18
; %bb.16:
	mov	x0, x20
	mov	x1, x21
	bl	_ff_dca_seek_bits
	cbz	x0, LBB0_19
; %bb.17:
	ldr	w0, [x19, #12]
Lloh39:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x2, l_.str.5@PAGE
Lloh43:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_4
LBB0_18:
	ldr	w8, [x19, #12]
Lloh44:
	adrp	x10, _AV_LOG_ERROR@GOTPAGE
Lloh45:
	ldr	x10, [x10, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x10]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	stp	x0, x9, [sp]
Lloh47:
	adrp	x2, l_.str.4@PAGE
Lloh48:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x8
	b	LBB0_4
LBB0_19:
Lloh49:
	adrp	x8, _HEADER_XXCH@GOTPAGE
Lloh50:
	ldr	x8, [x8, _HEADER_XXCH@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	ldr	w2, [x19, #20]
	mov	x0, x19
	bl	_parse_frame_data
	tbnz	w0, #31, LBB0_6
; %bb.20:
	add	w8, w21, w22, lsl #3
	add	w1, w8, #8
	mov	x0, x20
	bl	_ff_dca_seek_bits
	cbz	x0, LBB0_6
; %bb.21:
	ldr	w0, [x19, #12]
Lloh52:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh53:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
Lloh55:
	adrp	x2, l_.str.6@PAGE
Lloh56:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_4
	.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 AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_DCA_SYNCWORD_XXCH,8,3          ; @DCA_SYNCWORD_XXCH
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid XXCH sync word\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid XXCH frame header checksum\n"

	.comm	_DCA_SPEAKER_Cs,4,2             ; @DCA_SPEAKER_Cs
l_.str.2:                               ; @.str.2
	.asciz	"Invalid number of bits for XXCH speaker mask (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"%d XXCH channel sets"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_DCA_SPEAKER_MASK_Ls,4,2        ; @DCA_SPEAKER_MASK_Ls
	.comm	_DCA_SPEAKER_MASK_Lss,4,2       ; @DCA_SPEAKER_MASK_Lss
	.comm	_DCA_SPEAKER_MASK_Rs,4,2        ; @DCA_SPEAKER_MASK_Rs
	.comm	_DCA_SPEAKER_MASK_Rss,4,2       ; @DCA_SPEAKER_MASK_Rss
l_.str.4:                               ; @.str.4
	.asciz	"XXCH core speaker activity mask (%#x) disagrees with core (%#x)\n"

l_.str.5:                               ; @.str.5
	.asciz	"Read past end of XXCH frame header\n"

	.comm	_HEADER_XXCH,4,2                ; @HEADER_XXCH
l_.str.6:                               ; @.str.6
	.asciz	"Read past end of XXCH channel set\n"

	.no_dead_strip	_parse_xxch_frame
.subsections_via_symbols
