	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcm_digital_in_open
_pcm_digital_in_open:                   ## @pcm_digital_in_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	leaq	L_.str(%rip), %rdi
	callq	_DE_ACT
	movq	%r15, %rdi
	callq	_num_digital_busses_in
	movl	%eax, %r13d
	movl	(%r12), %ebx
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r15), %rcx
	movq	_DIGITAL_MODE_ADAT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_2
## %bb.1:
	movq	_ECHOCARD_HAS_ADAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	addl	%eax, %ebx
	subl	%ebx, %r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_pcm_open
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movl	4(%r12), %edi
	movq	_SNDRV_PCM_HW_PARAM_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_hw_rule_capture_channels_by_format@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SNDRV_PCM_HW_PARAM_FORMAT@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	movl	$-1, (%rsp)
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_snd_pcm_hw_rule_add
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movl	4(%r12), %edi
	movl	(%r13), %edx
	movq	_hw_rule_capture_format_by_channels@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SNDRV_PCM_HW_PARAM_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$-1, (%rsp)
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_snd_pcm_hw_rule_add
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	leaq	32(%r15), %r12
	movq	%r12, %rdi
	callq	_atomic_inc
	movq	%r12, %rdi
	callq	_atomic_read
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.6:
	cmpq	$0, 24(%r15)
	je	LBB0_10
## %bb.7:
	movq	$0, 16(%r15)
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcm_digital_in_open\n"

	.comm	_DIGITAL_MODE_ADAT,8,3          ## @DIGITAL_MODE_ADAT
	.comm	_ECHOCARD_HAS_ADAT,4,2          ## @ECHOCARD_HAS_ADAT
	.comm	_SNDRV_PCM_HW_PARAM_CHANNELS,4,2 ## @SNDRV_PCM_HW_PARAM_CHANNELS
	.comm	_hw_rule_capture_channels_by_format,4,2 ## @hw_rule_capture_channels_by_format
	.comm	_SNDRV_PCM_HW_PARAM_FORMAT,4,2  ## @SNDRV_PCM_HW_PARAM_FORMAT
	.comm	_hw_rule_capture_format_by_channels,4,2 ## @hw_rule_capture_format_by_channels
	.no_dead_strip	_pcm_digital_in_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcm_digital_in_open
_pcm_digital_in_open:                   ; @pcm_digital_in_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DE_ACT
	mov	x0, x20
	bl	_num_digital_busses_in
	mov	x22, x0
	ldr	w23, [x21]
	add	x19, x20, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _DIGITAL_MODE_ADAT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DIGITAL_MODE_ADAT@GOTPAGEOFF]
Lloh4:
	adrp	x10, _ECHOCARD_HAS_ADAT@GOTPAGE
Lloh5:
	ldr	x10, [x10, _ECHOCARD_HAS_ADAT@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
Lloh7:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w8, wzr, w10, eq
	add	w8, w23, w8
	sub	w1, w22, w8
	mov	x0, x21
	bl	_pcm_open
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	w0, [x21, #4]
Lloh8:
	adrp	x23, _SNDRV_PCM_HW_PARAM_CHANNELS@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SNDRV_PCM_HW_PARAM_CHANNELS@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh10:
	adrp	x8, _hw_rule_capture_channels_by_format@GOTPAGE
Lloh11:
	ldr	x8, [x8, _hw_rule_capture_channels_by_format@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	adrp	x24, _SNDRV_PCM_HW_PARAM_FORMAT@GOTPAGE
Lloh14:
	ldr	x24, [x24, _SNDRV_PCM_HW_PARAM_FORMAT@GOTPAGEOFF]
	ldr	w5, [x24]
	mov	w1, #0
	mov	x4, #0
	mov	w6, #-1
	bl	_snd_pcm_hw_rule_add
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldr	w0, [x21, #4]
	ldr	w2, [x24]
Lloh15:
	adrp	x8, _hw_rule_capture_format_by_channels@GOTPAGE
Lloh16:
	ldr	x8, [x8, _hw_rule_capture_format_by_channels@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	ldr	w5, [x23]
	mov	w1, #0
	mov	x4, #0
	mov	w6, #-1
	bl	_snd_pcm_hw_rule_add
	mov	x22, x0
	tbnz	w0, #31, LBB0_7
; %bb.3:
	add	x21, x20, #32
	mov	x0, x21
	bl	_atomic_inc
	mov	x0, x21
	bl	_atomic_read
	cmp	w0, #2
	b.lt	LBB0_7
; %bb.4:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_7
; %bb.5:
	str	xzr, [x20, #16]
	b	LBB0_7
LBB0_6:
	mov	x22, x0
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcm_digital_in_open\n"

	.comm	_DIGITAL_MODE_ADAT,8,3          ; @DIGITAL_MODE_ADAT
	.comm	_ECHOCARD_HAS_ADAT,4,2          ; @ECHOCARD_HAS_ADAT
	.comm	_SNDRV_PCM_HW_PARAM_CHANNELS,4,2 ; @SNDRV_PCM_HW_PARAM_CHANNELS
	.comm	_hw_rule_capture_channels_by_format,4,2 ; @hw_rule_capture_channels_by_format
	.comm	_SNDRV_PCM_HW_PARAM_FORMAT,4,2  ; @SNDRV_PCM_HW_PARAM_FORMAT
	.comm	_hw_rule_capture_format_by_channels,4,2 ; @hw_rule_capture_format_by_channels
	.no_dead_strip	_pcm_digital_in_open
.subsections_via_symbols
