	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbc_parse_header
_sbc_parse_header:                      ## @sbc_parse_header
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %eax
	cmpq	$3, %rcx
	jb	LBB0_8
## %bb.1:
	movl	(%rdx), %ecx
	movq	_MSBC_SYNCWORD@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_5
## %bb.2:
	cmpl	$0, 4(%rdx)
	jne	LBB0_5
## %bb.3:
	cmpl	$0, 8(%rdx)
	je	LBB0_4
LBB0_5:
	movq	_SBC_SYNCWORD@GOTPCREL(%rip), %rbx
	movl	$-2, %eax
	cmpl	(%rbx), %ecx
	jne	LBB0_8
## %bb.6:
	movl	4(%rdx), %r8d
	movl	%r8d, %eax
	shrl	$2, %eax
	movl	%eax, %r11d
	andl	$12, %r11d
	addl	$4, %r11d
	andl	$3, %eax
	leal	(,%r8,4), %ecx
	andl	$4, %ecx
	leal	4(%rcx), %r9d
	movq	_SBC_MODE_MONO@GOTPCREL(%rip), %r10
	xorl	%ebx, %ebx
	cmpl	(%r10), %eax
	sete	%bl
	movl	$2, %r10d
	subl	%ebx, %r10d
	movq	_SBC_MODE_JOINT_STEREO@GOTPCREL(%rip), %r14
	movl	%r10d, %r12d
	imull	%r9d, %r12d
	shrl	%r12d
	movq	_SBC_MODE_DUAL_CHANNEL@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	cmpl	(%r15), %eax
	sete	%bl
	incl	%ebx
	movl	8(%rdx), %edx
	imull	%r11d, %edx
	imull	%ebx, %edx
	orl	$11, %ecx
	cmpl	(%r14), %eax
	movl	$7, %eax
	cmovel	%ecx, %eax
	leal	(%rax,%rdx), %ecx
	addl	$7, %ecx
                                        ## kill: def $eax killed $eax killed $rax
	addl	%edx, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	leal	(%r12,%rcx), %eax
	addl	$4, %eax
	movl	%r10d, (%rsi)
	movq	_AV_SAMPLE_FMT_S16@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 16(%rsi)
	shrq	$4, %r8
	andl	$12, %r8d
	leaq	_sbc_parse_header.sample_rates(%rip), %rcx
	movl	(%r8,%rcx), %ecx
	movl	%ecx, 4(%rsi)
	imull	%r9d, %r11d
LBB0_7:
	movl	%r11d, 8(%rsi)
	movl	%r11d, (%rdi)
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1, (%rsi)
	movq	_AV_SAMPLE_FMT_S16@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rsi)
	movl	$16000, 4(%rsi)                 ## imm = 0x3E80
	movl	$57, %eax
	movl	$120, %r11d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @sbc_parse_header.sample_rates
_sbc_parse_header.sample_rates:
	.long	16000                           ## 0x3e80
	.long	32000                           ## 0x7d00
	.long	44100                           ## 0xac44
	.long	48000                           ## 0xbb80

	.comm	_MSBC_SYNCWORD,4,2              ## @MSBC_SYNCWORD
	.comm	_AV_SAMPLE_FMT_S16,8,3          ## @AV_SAMPLE_FMT_S16
	.comm	_SBC_SYNCWORD,4,2               ## @SBC_SYNCWORD
	.comm	_SBC_MODE_MONO,4,2              ## @SBC_MODE_MONO
	.comm	_SBC_MODE_JOINT_STEREO,4,2      ## @SBC_MODE_JOINT_STEREO
	.comm	_SBC_MODE_DUAL_CHANNEL,4,2      ## @SBC_MODE_DUAL_CHANNEL
	.no_dead_strip	_sbc_parse_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sbc_parse_header
lCPI0_0:
	.long	1                               ; 0x1
	.long	16000                           ; 0x3e80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sbc_parse_header:                      ; @sbc_parse_header
	.cfi_startproc
; %bb.0:
	cmp	x3, #3
	b.hs	LBB0_2
; %bb.1:
	mov	w0, #-1
	ret
LBB0_2:
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _MSBC_SYNCWORD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSBC_SYNCWORD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	w9, [x2, #4]
	cbnz	w9, LBB0_5
; %bb.4:
	ldr	w9, [x2, #8]
	cbz	w9, LBB0_9
LBB0_5:
Lloh3:
	adrp	x9, _SBC_SYNCWORD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SBC_SYNCWORD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.6:
	ldp	w8, w9, [x2, #4]
	ubfx	x10, x8, #6, #2
	ubfx	x11, x8, #2, #30
	and	w11, w11, #0xc
	add	w11, w11, #4
	ubfx	w12, w8, #2, #2
	ubfiz	w13, w8, #2, #1
	add	w13, w13, #4
Lloh6:
	adrp	x14, _SBC_MODE_MONO@GOTPAGE
Lloh7:
	ldr	x14, [x14, _SBC_MODE_MONO@GOTPAGEOFF]
Lloh8:
	ldr	w14, [x14]
	cmp	w12, w14
	mov	w14, #1
	cinc	w15, w14, ne
Lloh9:
	adrp	x16, _SBC_MODE_JOINT_STEREO@GOTPAGE
Lloh10:
	ldr	x16, [x16, _SBC_MODE_JOINT_STEREO@GOTPAGEOFF]
Lloh11:
	ldr	w16, [x16]
	mul	w17, w15, w13
	lsr	w17, w17, #1
Lloh12:
	adrp	x2, _SBC_MODE_DUAL_CHANNEL@GOTPAGE
Lloh13:
	ldr	x2, [x2, _SBC_MODE_DUAL_CHANNEL@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x2]
	cmp	w12, w2
	cinc	w14, w14, eq
	mul	w9, w11, w9
	mov	w2, #11
	bfi	w2, w8, #2, #1
	mov	w8, #7
	cmp	w12, w16
	csel	w8, w2, w8, eq
	madd	w8, w9, w14, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	add	w8, w17, w8, asr #3
	add	w8, w8, #4
Lloh15:
	adrp	x9, _AV_SAMPLE_FMT_S16@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AV_SAMPLE_FMT_S16@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x12, _sbc_parse_header.sample_rates@PAGE
Lloh19:
	add	x12, x12, _sbc_parse_header.sample_rates@PAGEOFF
	str	x9, [x1, #16]
	ldr	w9, [x12, x10, lsl #2]
	stp	w15, w9, [x1]
	mul	w9, w13, w11
LBB0_7:
	str	w9, [x1, #8]
	str	w9, [x0]
	mov	x0, x8
	ret
LBB0_8:
	mov	w0, #-2
	ret
LBB0_9:
Lloh20:
	adrp	x8, _AV_SAMPLE_FMT_S16@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_SAMPLE_FMT_S16@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	str	x8, [x1, #16]
Lloh23:
	adrp	x8, lCPI0_0@PAGE
Lloh24:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x1]
	mov	w8, #57
	mov	w9, #120
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdr	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sbc_parse_header.sample_rates
_sbc_parse_header.sample_rates:
	.long	16000                           ; 0x3e80
	.long	32000                           ; 0x7d00
	.long	44100                           ; 0xac44
	.long	48000                           ; 0xbb80

	.comm	_MSBC_SYNCWORD,4,2              ; @MSBC_SYNCWORD
	.comm	_AV_SAMPLE_FMT_S16,8,3          ; @AV_SAMPLE_FMT_S16
	.comm	_SBC_SYNCWORD,4,2               ; @SBC_SYNCWORD
	.comm	_SBC_MODE_MONO,4,2              ; @SBC_MODE_MONO
	.comm	_SBC_MODE_JOINT_STEREO,4,2      ; @SBC_MODE_JOINT_STEREO
	.comm	_SBC_MODE_DUAL_CHANNEL,4,2      ; @SBC_MODE_DUAL_CHANNEL
	.no_dead_strip	_sbc_parse_header
.subsections_via_symbols
