	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_bt87x_pcm_open
_snd_bt87x_pcm_open:                    ## @snd_bt87x_pcm_open
	.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, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	8(%r15), %r12
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_DEVICE_DIGITAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_snd_bt87x_set_digital_hw
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_snd_bt87x_set_analog_hw
LBB0_5:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	movq	_SNDRV_PCM_HW_PARAM_PERIODS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_snd_pcm_hw_constraint_integer
	testl	%eax, %eax
	js	LBB0_7
## %bb.10:
	movq	%r15, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %ebx
LBB0_8:
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	_clear_bit
	xorl	%eax, %eax
	callq	_smp_mb__after_clear_bit
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_DEVICE_DIGITAL,8,3             ## @DEVICE_DIGITAL
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ## @SNDRV_PCM_HW_PARAM_PERIODS
	.no_dead_strip	_snd_bt87x_pcm_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_bt87x_pcm_open
_snd_bt87x_pcm_open:                    ; @snd_bt87x_pcm_open
	.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	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x21, [x20, #8]
	mov	w0, #0
	mov	x1, x19
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_2:
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _DEVICE_DIGITAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEVICE_DIGITAL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	x0, x19
	mov	x1, x21
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	bl	_snd_bt87x_set_digital_hw
	mov	x22, x0
	tbz	w0, #31, LBB0_5
	b	LBB0_8
LBB0_4:
	bl	_snd_bt87x_set_analog_hw
	mov	x22, x0
	tbnz	w0, #31, LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_snd_pcm_hw_constraint_integer
	tbnz	w0, #31, LBB0_7
; %bb.6:
	mov	w22, #0
	str	x20, [x19, #8]
	b	LBB0_9
LBB0_7:
	mov	x22, x0
LBB0_8:
	mov	w0, #0
	mov	x1, x19
	bl	_clear_bit
	bl	_smp_mb__after_clear_bit
LBB0_9:
	mov	x0, x22
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_DEVICE_DIGITAL,8,3             ; @DEVICE_DIGITAL
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ; @SNDRV_PCM_HW_PARAM_PERIODS
	.no_dead_strip	_snd_bt87x_pcm_open
.subsections_via_symbols
