	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flac_set_bps
_flac_set_bps:                          ## @flac_set_bps
	.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
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movl	(%rax), %r14d
	cmpl	$17, 4(%rdi)
	setge	%r15b
	movl	%r14d, %edi
	callq	_av_get_bytes_per_sample
	cmpl	$3, %eax
	setge	%bl
	movl	%r14d, %edi
	callq	_av_sample_fmt_is_planar
	orb	%r15b, %bl
	movzbl	%bl, %ecx
	movl	%ecx, %edx
	shll	$4, %edx
	testl	%eax, %eax
	movq	_AV_SAMPLE_FMT_S32P@GOTPCREL(%rip), %rax
	cmoveq	_AV_SAMPLE_FMT_S32@GOTPCREL(%rip), %rax
	movq	_AV_SAMPLE_FMT_S16P@GOTPCREL(%rip), %rsi
	cmoveq	_AV_SAMPLE_FMT_S16@GOTPCREL(%rip), %rsi
	testb	%cl, %cl
	cmovneq	%rax, %rsi
	movl	(%rsi), %eax
	movq	8(%r12), %rcx
	movl	%eax, 4(%rcx)
	subl	4(%r12), %edx
	addl	$16, %edx
	movl	%edx, (%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_SAMPLE_FMT_S32P,4,2         ## @AV_SAMPLE_FMT_S32P
	.comm	_AV_SAMPLE_FMT_S32,4,2          ## @AV_SAMPLE_FMT_S32
	.comm	_AV_SAMPLE_FMT_S16P,4,2         ## @AV_SAMPLE_FMT_S16P
	.comm	_AV_SAMPLE_FMT_S16,4,2          ## @AV_SAMPLE_FMT_S16
	.no_dead_strip	_flac_set_bps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flac_set_bps
_flac_set_bps:                          ; @flac_set_bps
	.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, x0
	ldr	x8, [x0, #8]
	ldr	w20, [x8]
	ldr	w22, [x0, #4]
	mov	x0, x20
	bl	_av_get_bytes_per_sample
	mov	x21, x0
	mov	x0, x20
	bl	_av_sample_fmt_is_planar
	cmp	w22, #16
	ccmp	w21, #2, #0, le
	cset	w8, gt
Lloh0:
	adrp	x9, _AV_SAMPLE_FMT_S32@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_SAMPLE_FMT_S32@GOTPAGEOFF]
Lloh2:
	adrp	x10, _AV_SAMPLE_FMT_S32P@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_SAMPLE_FMT_S32P@GOTPAGEOFF]
	cmp	w0, #0
	csel	x9, x9, x10, eq
Lloh4:
	adrp	x10, _AV_SAMPLE_FMT_S16@GOTPAGE
Lloh5:
	ldr	x10, [x10, _AV_SAMPLE_FMT_S16@GOTPAGEOFF]
Lloh6:
	adrp	x11, _AV_SAMPLE_FMT_S16P@GOTPAGE
Lloh7:
	ldr	x11, [x11, _AV_SAMPLE_FMT_S16P@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	mov	w11, #16
	mov	w12, #32
	cmp	w8, #0
	csel	w8, w12, w11, ne
	csel	x9, x9, x10, ne
	ldr	w9, [x9]
	ldr	x10, [x19, #8]
	str	w9, [x10, #4]
	ldr	w9, [x19, #4]
	sub	w8, w8, w9
	str	w8, [x19]
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_SAMPLE_FMT_S32P,4,2         ; @AV_SAMPLE_FMT_S32P
	.comm	_AV_SAMPLE_FMT_S32,4,2          ; @AV_SAMPLE_FMT_S32
	.comm	_AV_SAMPLE_FMT_S16P,4,2         ; @AV_SAMPLE_FMT_S16P
	.comm	_AV_SAMPLE_FMT_S16,4,2          ; @AV_SAMPLE_FMT_S16
	.no_dead_strip	_flac_set_bps
.subsections_via_symbols
