	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_header
_parse_header:                          ## @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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_MPEGSplitter_head_check
	movq	_MPEG_AUDIO_HEADER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.1:
	movl	4(%rbx), %edx
	movl	8(%rbx), %r9d
	xorl	%esi, %esi
	testb	$8, %dl
	sete	%sil
	movl	%edx, %edi
	shrl	%edi
	andl	$3, %edi
	testb	$16, %dl
	movl	$1, %ecx
	cmovnel	%esi, %ecx
	leal	(%rsi,%rsi,2), %esi
	movl	$6, %r8d
	cmovnel	%esi, %r8d
	movq	_tabsel_123@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	(%rsi,%rcx,8), %rsi
	movq	%rdi, %rax
	xorq	$3, %rax
	movq	(%rsi,%rax,8), %rax
	movq	%r9, %rsi
	shrq	$2, %rsi
	andl	$60, %esi
	movl	(%rax,%rsi), %esi
	testl	%esi, %esi
	je	LBB0_7
## %bb.2:
	movl	%r9d, %eax
	shrl	$2, %eax
	andl	$3, %eax
	addq	%rax, %r8
	shrl	%r9d
	andl	$1, %r9d
	cmpl	$1, %edi
	je	LBB0_11
## %bb.3:
	cmpl	$2, %edi
	je	LBB0_12
## %bb.4:
	cmpl	$3, %edi
	jne	LBB0_16
## %bb.5:
	imull	$12000, %esi, %eax              ## imm = 0x2EE0
	movq	_freqs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltd
	idivl	(%rcx,%r8,4)
	addl	%r9d, %eax
	shll	$2, %eax
	jmp	LBB0_14
LBB0_6:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movl	8(%rbx), %ecx
	movl	12(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_7:
	movl	(%rbx), %esi
	movl	12(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%r9d, %ecx
LBB0_8:
	callq	_FIXME
LBB0_9:
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rcx
LBB0_10:
	movl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_freqs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r8d, %edx
	movl	(%rax,%rdx,4), %edi
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %edi
	imull	$144000, %esi, %eax             ## imm = 0x23280
	cltd
	idivl	%edi
	jmp	LBB0_13
LBB0_12:
	imull	$144000, %esi, %eax             ## imm = 0x23280
	movq	_freqs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r8d, %edi
	cltd
	idivl	(%rcx,%rdi,4)
LBB0_13:
	addl	%r9d, %eax
LBB0_14:
	movl	%eax, (%r14)
	movq	_S_OK@GOTPCREL(%rip), %rcx
	testq	%r15, %r15
	je	LBB0_10
## %bb.15:
	imull	$10000000, %eax, %eax           ## imm = 0x989680
	imull	$125, %esi, %esi
	cltd
	idivl	%esi
	addl	%eax, (%r15)
	jmp	LBB0_10
LBB0_16:
	leaq	L_.str.1(%rip), %rdi
	movl	$4, %esi
	callq	_ERR
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MPEG_AUDIO_HEADER,8,3          ## @MPEG_AUDIO_HEADER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not a valid header: %02x:%02x:%02x:%02x\n"

	.comm	_E_INVALIDARG,4,2               ## @E_INVALIDARG
	.comm	_tabsel_123,8,3                 ## @tabsel_123
	.comm	_freqs,8,3                      ## @freqs
L_.str.1:                               ## @.str.1
	.asciz	"Impossible layer %d\n"

	.comm	_S_OK,4,2                       ## @S_OK
	.no_dead_strip	_parse_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_header
_parse_header:                          ; @parse_header
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_MPEGSplitter_head_check
Lloh0:
	adrp	x8, _MPEG_AUDIO_HEADER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPEG_AUDIO_HEADER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.1:
	mov	w8, #1
	ldp	w2, w3, [x21, #4]
	bic	w8, w8, w2, lsr #3
	tst	w2, #0x10
	csinc	w10, w8, wzr, ne
	ubfx	x12, x2, #1, #2
	ubfx	x11, x3, #4, #4
	bfi	w8, w8, #1, #1
	mov	w9, #6
Lloh3:
	adrp	x13, _tabsel_123@GOTPAGE
Lloh4:
	ldr	x13, [x13, _tabsel_123@GOTPAGEOFF]
Lloh5:
	ldr	x13, [x13]
	ldr	x13, [x13, w10, uxtw #3]
	csel	w9, w9, w8, eq
	eor	x8, x12, #0x3
	ldr	x8, [x13, x8, lsl #3]
	ldr	w8, [x8, x11, lsl #2]
	cbz	w8, LBB0_7
; %bb.2:
	ubfx	x11, x3, #2, #2
	add	x11, x9, x11
	ubfx	w9, w3, #1, #1
	cmp	w12, #1
	b.eq	LBB0_10
; %bb.3:
	cmp	w12, #2
	b.eq	LBB0_11
; %bb.4:
	cmp	w12, #3
	b.ne	LBB0_16
; %bb.5:
	mov	w10, #12000
	mul	w10, w8, w10
Lloh6:
	adrp	x12, _freqs@GOTPAGE
Lloh7:
	ldr	x12, [x12, _freqs@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	ldr	w11, [x12, x11, lsl #2]
	sdiv	w10, w10, w11
	add	w9, w10, w9
	lsl	w9, w9, #2
	str	w9, [x20]
	cbnz	x19, LBB0_13
	b	LBB0_14
LBB0_6:
	ldp	w1, w2, [x21]
	ldp	w3, w4, [x21, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldr	w1, [x21]
	ldr	w4, [x21, #12]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
LBB0_8:
	bl	_FIXME
LBB0_9:
Lloh13:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
	b	LBB0_15
LBB0_10:
	mov	w12, #12928
	movk	w12, #2, lsl #16
	mul	w12, w8, w12
Lloh15:
	adrp	x13, _freqs@GOTPAGE
Lloh16:
	ldr	x13, [x13, _freqs@GOTPAGEOFF]
Lloh17:
	ldr	x13, [x13]
	ldr	w11, [x13, w11, uxtw #2]
	lsl	w10, w11, w10
	sdiv	w10, w12, w10
	b	LBB0_12
LBB0_11:
	mov	w10, #12928
	movk	w10, #2, lsl #16
Lloh18:
	adrp	x12, _freqs@GOTPAGE
Lloh19:
	ldr	x12, [x12, _freqs@GOTPAGEOFF]
	mul	w10, w8, w10
Lloh20:
	ldr	x12, [x12]
	ldr	w11, [x12, w11, uxtw #2]
	sdiv	w10, w10, w11
LBB0_12:
	add	w9, w10, w9
	str	w9, [x20]
	cbz	x19, LBB0_14
LBB0_13:
	mov	w10, #38528
	movk	w10, #152, lsl #16
	mul	w9, w9, w10
	mov	w10, #125
	mul	w8, w8, w10
	sdiv	w8, w9, w8
	ldr	w9, [x19]
	add	w8, w9, w8
	str	w8, [x19]
LBB0_14:
Lloh21:
	adrp	x8, _S_OK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #4
	bl	_ERR
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MPEG_AUDIO_HEADER,8,3          ; @MPEG_AUDIO_HEADER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not a valid header: %02x:%02x:%02x:%02x\n"

	.comm	_E_INVALIDARG,4,2               ; @E_INVALIDARG
	.comm	_tabsel_123,8,3                 ; @tabsel_123
	.comm	_freqs,8,3                      ; @freqs
l_.str.1:                               ; @.str.1
	.asciz	"Impossible layer %d\n"

	.comm	_S_OK,4,2                       ; @S_OK
	.no_dead_strip	_parse_header
.subsections_via_symbols
