	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_digital_mode
_set_digital_mode:                      ## @set_digital_mode
	.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
	cmpq	$0, 40(%rdi)
	je	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	%esi, %ebx
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movl	4(%r12), %eax
	xorl	%edi, %edi
	btl	%ebx, %eax
	setae	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_21:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	8(%r12), %r15d
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dsp_set_digital_mode
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_21
## %bb.8:
	cmpl	%ebx, %r15d
	je	LBB0_21
## %bb.9:
	movq	_DIGITAL_MODE_ADAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	je	LBB0_11
## %bb.10:
	cmpl	%ebx, %eax
	jne	LBB0_21
LBB0_11:
	leaq	12(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	%r12, %rdi
	callq	_num_busses_out
	testl	%eax, %eax
	jle	LBB0_17
## %bb.12:
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r13
	movq	%r12, %rdi
	callq	_num_busses_out
	cltq
	cmpq	%rax, %r13
	jge	LBB0_17
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	%r12, %rdi
	callq	_num_busses_in
	testl	%eax, %eax
	jle	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	32(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%rbx,4), %ecx
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_set_monitor_gain
	incq	%rbx
	movq	%r12, %rdi
	callq	_num_busses_in
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_15
	jmp	LBB0_16
LBB0_17:
	movq	%r12, %rdi
	callq	_num_busses_out
	testl	%eax, %eax
	jle	LBB0_20
## %bb.18:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_set_output_gain
	incq	%rbx
	movq	%r12, %rdi
	callq	_num_busses_out
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_19
LBB0_20:
	movq	%r12, %rdi
	callq	_update_output_line_level
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DIGITAL_MODE_ADAT,4,2          ## @DIGITAL_MODE_ADAT
	.no_dead_strip	_set_digital_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_digital_mode
_set_digital_mode:                      ; @set_digital_mode
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_snd_BUG_ON
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	w8, [x19, #4]
	mvn	w8, w8
	lsr	w8, w8, w21
	and	w0, w8, #0x1
	bl	_snd_BUG_ON
	cbz	x0, LBB0_8
; %bb.5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	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
LBB0_8:
	ldr	w22, [x19, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_dsp_set_digital_mode
	mov	x20, x0
	tbnz	w0, #31, LBB0_7
; %bb.9:
	cmp	w22, w21
	b.eq	LBB0_7
; %bb.10:
Lloh6:
	adrp	x8, _DIGITAL_MODE_ADAT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DIGITAL_MODE_ADAT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w22, w8
	ccmp	w8, w21, #4, ne
	b.ne	LBB0_7
; %bb.11:
	add	x21, x19, #12
	mov	x0, x21
	bl	_spin_lock_irq
	mov	x0, x19
	bl	_num_busses_out
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.12:
	mov	x22, #0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x22, x22, #1
	mov	x0, x19
	bl	_num_busses_out
	cmp	x22, w0, sxtw
	b.ge	LBB0_17
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	mov	x0, x19
	bl	_num_busses_in
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x23, #0
LBB0_16:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w3, [x8, x23, lsl #2]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_set_monitor_gain
	add	x23, x23, #1
	mov	x0, x19
	bl	_num_busses_in
	cmp	x23, w0, sxtw
	b.lt	LBB0_16
	b	LBB0_13
LBB0_17:
	mov	x0, x19
	bl	_num_busses_out
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.18:
	mov	x22, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x19
	mov	x1, x22
	bl	_set_output_gain
	add	x22, x22, #1
	mov	x0, x19
	bl	_num_busses_out
	cmp	x22, w0, sxtw
	b.lt	LBB0_19
LBB0_20:
	mov	x0, x19
	bl	_update_output_line_level
	mov	x0, x21
	bl	_spin_unlock_irq
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DIGITAL_MODE_ADAT,4,2          ; @DIGITAL_MODE_ADAT
	.no_dead_strip	_set_digital_mode
.subsections_via_symbols
