	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_rme32_capture_spdif_open
_snd_rme32_capture_spdif_open:          ## @snd_rme32_capture_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	8(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	cmpq	$0, 16(%r15)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_2:
	movq	%rbx, 16(%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	cmpq	$0, (%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	%r15, %rdi
	callq	_RME32_PRO_WITH_8414
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_SNDRV_PCM_RATE_88200@GOTPCREL(%rip), %rax
	movq	_SNDRV_PCM_RATE_96000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%r14)
	movl	$96000, 4(%r14)                 ## imm = 0x17700
LBB0_7:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_snd_rme32_capture_getrate
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	cmpl	$0, -36(%rbp)
	je	LBB0_11
## %bb.9:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_11:
	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_12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_snd_rme32_set_buffer_constraint
	xorl	%eax, %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.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	_SNDRV_PCM_RATE_88200,4,2       ## @SNDRV_PCM_RATE_88200
	.comm	_SNDRV_PCM_RATE_96000,4,2       ## @SNDRV_PCM_RATE_96000
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_snd_rme32_capture_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_capture_spdif_open
_snd_rme32_capture_spdif_open:          ; @snd_rme32_capture_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, #8
	mov	x0, x22
	bl	_spin_lock_irq
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x22
	bl	_spin_unlock_irq
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_3:
	str	x21, [x19, #16]
	mov	x0, x22
	bl	_spin_unlock_irq
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _snd_rme32_spdif_fd_info@GOTPAGE
Lloh3:
	ldr	x8, [x8, _snd_rme32_spdif_fd_info@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _snd_rme32_spdif_info@GOTPAGE
Lloh5:
	ldr	x8, [x8, _snd_rme32_spdif_info@GOTPAGEOFF]
LBB0_6:
	ldr	x9, [x8]
	ldr	w8, [x8, #8]
	str	w8, [x20, #8]
	str	x9, [x20]
	mov	x0, x19
	bl	_RME32_PRO_WITH_8414
	cbz	x0, LBB0_8
; %bb.7:
Lloh6:
	adrp	x8, _SNDRV_PCM_RATE_88200@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SNDRV_PCM_RATE_88200@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _SNDRV_PCM_RATE_96000@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SNDRV_PCM_RATE_96000@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20]
	orr	w8, w8, w9
	mov	w9, #30464
	movk	w9, #1, lsl #16
	stp	w8, w9, [x20]
LBB0_8:
	add	x1, sp, #12
	mov	x0, x19
	bl	_snd_rme32_capture_getrate
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.9:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_11
; %bb.10:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
LBB0_11:
	mov	x21, x0
	bl	_snd_pcm_rate_to_rate_bit
	stp	w21, w21, [x20, #4]
	str	w0, [x20]
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_snd_rme32_set_buffer_constraint
	mov	w0, #0
LBB0_13:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.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	_SNDRV_PCM_RATE_88200,4,2       ; @SNDRV_PCM_RATE_88200
	.comm	_SNDRV_PCM_RATE_96000,4,2       ; @SNDRV_PCM_RATE_96000
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_snd_rme32_capture_spdif_open
.subsections_via_symbols
