	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_bt87x_prepare
_snd_bt87x_prepare:                     ## @snd_bt87x_prepare
	.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	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	movq	(%rbx), %rbx
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	_CTL_DA_SDR_MASK@GOTPCREL(%rip), %rax
	movq	_CTL_DA_SBR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	orl	(%rax), %edi
	notl	%edi
	andl	(%r15), %edi
	movl	%edi, (%r15)
	movl	(%rbx), %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	movq	_ANALOG_CLOCK@GOTPCREL(%rip), %rdx
	sarl	$2, %eax
	addl	(%rdx), %eax
	cltd
	idivl	%ecx
	movq	_CTL_DA_SDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%edi, %eax
	movl	%eax, (%r15)
	movq	8(%rbx), %rcx
	movq	_SNDRV_PCM_FORMAT_S8@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	orl	(%rsi), %eax
	movl	%eax, (%r15)
LBB0_2:
	movq	_REG_GPIO_DMA_CTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_snd_bt87x_writel
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_DA_SDR_MASK,4,2            ## @CTL_DA_SDR_MASK
	.comm	_CTL_DA_SBR,4,2                 ## @CTL_DA_SBR
	.comm	_ANALOG_CLOCK,4,2               ## @ANALOG_CLOCK
	.comm	_CTL_DA_SDR_SHIFT,4,2           ## @CTL_DA_SDR_SHIFT
	.comm	_SNDRV_PCM_FORMAT_S8,8,3        ## @SNDRV_PCM_FORMAT_S8
	.comm	_REG_GPIO_DMA_CTL,4,2           ## @REG_GPIO_DMA_CTL
	.no_dead_strip	_snd_bt87x_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_bt87x_prepare
_snd_bt87x_prepare:                     ; @snd_bt87x_prepare
	.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
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	ldr	x21, [x19]
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irq
Lloh0:
	adrp	x8, _CTL_DA_SDR_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTL_DA_SDR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _CTL_DA_SBR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CTL_DA_SBR@GOTPAGEOFF]
	ldr	w10, [x8]
	orr	w9, w10, w9
	ldr	w10, [x20]
	bic	w9, w10, w9
	str	w9, [x20]
Lloh5:
	adrp	x10, _ANALOG_CLOCK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ANALOG_CLOCK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	ldr	w11, [x21]
	add	w12, w11, #3
	cmp	w11, #0
	csel	w12, w12, w11, lt
	add	w10, w10, w12, asr #2
	sdiv	w10, w10, w11
Lloh8:
	adrp	x11, _CTL_DA_SDR_SHIFT@GOTPAGE
Lloh9:
	ldr	x11, [x11, _CTL_DA_SDR_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	orr	w2, w10, w9
	str	w2, [x20]
	ldr	x9, [x21, #8]
Lloh11:
	adrp	x10, _SNDRV_PCM_FORMAT_S8@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SNDRV_PCM_FORMAT_S8@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x8]
	orr	w2, w8, w2
	str	w2, [x20]
LBB0_2:
Lloh14:
	adrp	x8, _REG_GPIO_DMA_CTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_GPIO_DMA_CTL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_snd_bt87x_writel
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_DA_SDR_MASK,4,2            ; @CTL_DA_SDR_MASK
	.comm	_CTL_DA_SBR,4,2                 ; @CTL_DA_SBR
	.comm	_ANALOG_CLOCK,4,2               ; @ANALOG_CLOCK
	.comm	_CTL_DA_SDR_SHIFT,4,2           ; @CTL_DA_SDR_SHIFT
	.comm	_SNDRV_PCM_FORMAT_S8,8,3        ; @SNDRV_PCM_FORMAT_S8
	.comm	_REG_GPIO_DMA_CTL,4,2           ; @REG_GPIO_DMA_CTL
	.no_dead_strip	_snd_bt87x_prepare
.subsections_via_symbols
