	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_rme32_playback_spdif_open
_snd_rme32_playback_spdif_open:         ## @snd_rme32_playback_spdif_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	callq	_snd_pcm_set_sync
	leaq	48(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	cmpq	$0, 56(%r15)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_2:
	movq	_RME32_WCR_ADAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	andl	72(%r15), %edi
	movl	%edi, 72(%r15)
	movq	_RME32_IO_CONTROL_REGISTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	64(%r15), %rsi
	callq	_writel
	movq	%rbx, 56(%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	cmpq	$0, 40(%r15)
	je	LBB0_4
## %bb.3:
	movq	_snd_rme32_spdif_fd_info@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_snd_rme32_spdif_info@GOTPCREL(%rip), %rax
LBB0_5:
	movl	8(%rax), %ecx
	movl	%ecx, 8(%r14)
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	32(%r15), %rax
	movq	(%rax), %rax
	movq	_PCI_DEVICE_ID_RME_DIGI32_PRO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_SNDRV_PCM_RATE_64000@GOTPCREL(%rip), %rax
	movq	_SNDRV_PCM_RATE_88200@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SNDRV_PCM_RATE_96000@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, (%r14)
	movl	$96000, 4(%r14)                 ## imm = 0x17700
LBB0_7:
	movq	_RME32_RCR_KMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_10
## %bb.8:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_snd_rme32_capture_getrate
	testl	%eax, %eax
	jle	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_snd_pcm_rate_to_rate_bit
	movl	%eax, (%r14)
	movl	%ebx, 8(%r14)
	movl	%ebx, 4(%r14)
LBB0_10:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_snd_rme32_set_buffer_constraint
	movl	20(%r15), %eax
	movl	%eax, 24(%r15)
	movq	_SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	8(%r15), %rdx
	movq	8(%rdx), %rcx
	andl	%eax, (%rcx)
	movl	16(%r15), %edi
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movq	_SNDRV_CTL_EVENT_MASK_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_snd_ctl_notify
	xorl	%eax, %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_RME32_WCR_ADAT,4,2             ## @RME32_WCR_ADAT
	.comm	_RME32_IO_CONTROL_REGISTER,8,3  ## @RME32_IO_CONTROL_REGISTER
	.comm	_snd_rme32_spdif_fd_info,12,2   ## @snd_rme32_spdif_fd_info
	.comm	_snd_rme32_spdif_info,12,2      ## @snd_rme32_spdif_info
	.comm	_PCI_DEVICE_ID_RME_DIGI32_PRO,8,3 ## @PCI_DEVICE_ID_RME_DIGI32_PRO
	.comm	_SNDRV_PCM_RATE_64000,4,2       ## @SNDRV_PCM_RATE_64000
	.comm	_SNDRV_PCM_RATE_88200,4,2       ## @SNDRV_PCM_RATE_88200
	.comm	_SNDRV_PCM_RATE_96000,4,2       ## @SNDRV_PCM_RATE_96000
	.comm	_RME32_RCR_KMODE,4,2            ## @RME32_RCR_KMODE
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ## @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ## @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ## @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_snd_rme32_playback_spdif_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_rme32_playback_spdif_open
_snd_rme32_playback_spdif_open:         ; @snd_rme32_playback_spdif_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x20, [x21]
	mov	x0, x21
	bl	_snd_pcm_set_sync
	add	x22, x19, #48
	mov	x0, x22
	bl	_spin_lock_irq
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_spin_unlock_irq
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_2:
Lloh3:
	adrp	x8, _RME32_WCR_ADAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RME32_WCR_ADAT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #72]
	bic	w0, w9, w8
	str	w0, [x19, #72]
	ldr	x8, [x19, #64]
Lloh6:
	adrp	x9, _RME32_IO_CONTROL_REGISTER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RME32_IO_CONTROL_REGISTER@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	str	x21, [x19, #56]
	mov	x0, x22
	bl	_spin_unlock_irq
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _snd_rme32_spdif_fd_info@GOTPAGE
Lloh10:
	ldr	x8, [x8, _snd_rme32_spdif_fd_info@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _snd_rme32_spdif_info@GOTPAGE
Lloh12:
	ldr	x8, [x8, _snd_rme32_spdif_info@GOTPAGEOFF]
LBB0_5:
	ldr	x9, [x8]
	ldr	w8, [x8, #8]
	str	w8, [x20, #8]
	str	x9, [x20]
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _PCI_DEVICE_ID_RME_DIGI32_PRO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PCI_DEVICE_ID_RME_DIGI32_PRO@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh16:
	adrp	x8, _SNDRV_PCM_RATE_64000@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SNDRV_PCM_RATE_64000@GOTPAGEOFF]
Lloh18:
	adrp	x9, _SNDRV_PCM_RATE_88200@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SNDRV_PCM_RATE_88200@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _SNDRV_PCM_RATE_96000@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SNDRV_PCM_RATE_96000@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x20]
	orr	w8, w8, w9
	mov	w9, #30464
	movk	w9, #1, lsl #16
	stp	w8, w9, [x20]
LBB0_7:
	ldr	w8, [x19]
Lloh25:
	adrp	x9, _RME32_RCR_KMODE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _RME32_RCR_KMODE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.8:
	add	x1, sp, #12
	mov	x0, x19
	bl	_snd_rme32_capture_getrate
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.9:
	mov	x21, x0
	bl	_snd_pcm_rate_to_rate_bit
	stp	w21, w21, [x20, #4]
	str	w0, [x20]
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	bl	_snd_rme32_set_buffer_constraint
	ldp	w0, w8, [x19, #16]
	str	w8, [x19, #24]
Lloh28:
	adrp	x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	x2, [x19, #8]
	ldr	x9, [x2, #8]
	ldr	w10, [x9]
	bic	w8, w10, w8
Lloh31:
	adrp	x10, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh32:
	ldr	x10, [x10, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
	str	w8, [x9]
Lloh33:
	ldr	w8, [x10]
Lloh34:
	adrp	x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_snd_ctl_notify
	mov	w0, #0
LBB0_11:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_RME32_WCR_ADAT,4,2             ; @RME32_WCR_ADAT
	.comm	_RME32_IO_CONTROL_REGISTER,8,3  ; @RME32_IO_CONTROL_REGISTER
	.comm	_snd_rme32_spdif_fd_info,12,2   ; @snd_rme32_spdif_fd_info
	.comm	_snd_rme32_spdif_info,12,2      ; @snd_rme32_spdif_info
	.comm	_PCI_DEVICE_ID_RME_DIGI32_PRO,8,3 ; @PCI_DEVICE_ID_RME_DIGI32_PRO
	.comm	_SNDRV_PCM_RATE_64000,4,2       ; @SNDRV_PCM_RATE_64000
	.comm	_SNDRV_PCM_RATE_88200,4,2       ; @SNDRV_PCM_RATE_88200
	.comm	_SNDRV_PCM_RATE_96000,4,2       ; @SNDRV_PCM_RATE_96000
	.comm	_RME32_RCR_KMODE,4,2            ; @RME32_RCR_KMODE
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ; @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ; @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ; @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_snd_rme32_playback_spdif_open
.subsections_via_symbols
