	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_best_header
_get_best_header:                       ## @get_best_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	%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	%rdx, %r13
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	72(%rdi), %r15
	movq	40(%r15), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movl	(%r14), %eax
	subl	(%r15), %eax
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_check_header_mismatch
	jmp	LBB0_3
LBB0_1:
	movl	4(%rbx), %edi
	callq	_av_fifo_size
	subl	(%r15), %eax
	movl	%eax, (%r13)
LBB0_3:
	movq	8(%r15), %rax
	movq	64(%rbx), %rdi
	cmpq	(%rdi), %rax
	jne	LBB0_5
## %bb.4:
	cmpl	$0, 12(%rdi)
	jne	LBB0_6
LBB0_5:
	movq	%rax, (%rdi)
	callq	_ff_flac_set_channel_layout
	movq	64(%rbx), %rdi
LBB0_6:
	leaq	8(%r15), %r12
	movl	32(%r15), %eax
	movl	%eax, 8(%rdi)
	movl	16(%r15), %eax
	movq	48(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	(%r15), %esi
	movl	(%r13), %edx
	leaq	60(%rbx), %rcx
	leaq	56(%rbx), %r8
	movq	%rbx, %rdi
	callq	_flac_fifo_read_wrap
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	48(%rbx), %rax
	movq	_PARSER_FLAG_USE_CODEC_TS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_12
## %bb.7:
	cmpq	$0, 24(%r15)
	je	LBB0_9
## %bb.8:
	movl	20(%r15), %ecx
	jmp	LBB0_11
LBB0_9:
	cmpq	$0, 40(%r15)
	je	LBB0_12
## %bb.10:
	movl	16(%r15), %ecx
	imull	20(%r15), %ecx
LBB0_11:
	movl	%ecx, 8(%rax)
LBB0_12:
	movq	$0, 40(%rbx)
	movl	$1, (%rbx)
	movups	(%r12), %xmm0
	movups	16(%r12), %xmm1
	movups	%xmm0, 8(%rbx)
	movups	%xmm1, 24(%rbx)
	testq	%r14, %r14
	je	LBB0_13
## %bb.14:
	movl	(%r14), %r14d
	movl	4(%rbx), %edi
	callq	_av_fifo_size
	subl	%eax, %r14d
	jmp	LBB0_15
LBB0_13:
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PARSER_FLAG_USE_CODEC_TS,4,2   ## @PARSER_FLAG_USE_CODEC_TS
	.no_dead_strip	_get_best_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_best_header
_get_best_header:                       ; @get_best_header
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x21, [x0, #72]
	ldr	x20, [x21, #40]
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	ldr	w9, [x21]
	sub	w8, w8, w9
	str	w8, [x23]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_check_header_mismatch
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_av_fifo_size
	ldr	w8, [x21]
	sub	w8, w0, w8
	str	w8, [x23]
LBB0_3:
	mov	x24, x21
	ldr	x8, [x24, #8]!
	ldr	x0, [x19, #64]
	ldr	x9, [x0]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w9, [x0, #12]
	cbnz	w9, LBB0_6
LBB0_5:
	str	x8, [x0]
	bl	_ff_flac_set_channel_layout
	ldr	x0, [x19, #64]
LBB0_6:
	ldr	w8, [x21, #32]
	str	w8, [x0, #8]
	ldr	w8, [x21, #16]
	ldr	x9, [x19, #48]
	str	w8, [x9]
	ldr	w1, [x21]
	ldr	w2, [x23]
	add	x3, x19, #60
	add	x4, x19, #56
	mov	x0, x19
	bl	_flac_fifo_read_wrap
	str	x0, [x22]
	ldr	x8, [x19, #48]
	ldr	w9, [x8, #4]
Lloh0:
	adrp	x10, _PARSER_FLAG_USE_CODEC_TS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PARSER_FLAG_USE_CODEC_TS@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.7:
	ldr	x9, [x21, #24]
	cbz	x9, LBB0_9
; %bb.8:
	ldr	w9, [x21, #20]
	b	LBB0_11
LBB0_9:
	ldr	x9, [x21, #40]
	cbz	x9, LBB0_12
; %bb.10:
	ldp	w10, w9, [x21, #16]
	mul	w9, w10, w9
LBB0_11:
	str	w9, [x8, #8]
LBB0_12:
	str	xzr, [x19, #40]
	mov	w8, #1
	str	w8, [x19]
	ldp	q0, q1, [x24]
	stur	q1, [x19, #24]
	stur	q0, [x19, #8]
	cbz	x20, LBB0_14
; %bb.13:
	ldr	w20, [x20]
	ldr	w0, [x19, #4]
	bl	_av_fifo_size
	sub	w0, w20, w0
	b	LBB0_15
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PARSER_FLAG_USE_CODEC_TS,4,2   ; @PARSER_FLAG_USE_CODEC_TS
	.no_dead_strip	_get_best_header
.subsections_via_symbols
