	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsp_allocate_router_ports
_dsp_allocate_router_ports:             ## @dsp_allocate_router_ports
	.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	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_VENDOR_CHIPIO_STATUS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	xorl	%edx, %edx
	callq	_chipio_send
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	shll	$6, %r13d
	shll	$4, %r12d
	addl	$-16, %r12d
	decl	%ebx
	orl	%r13d, %ebx
	orl	%r12d, %ebx
	movq	_WIDGET_CHIP_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_VENDOR_CHIPIO_PORT_ALLOC_CONFIG_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	%ebx, %r8d
	callq	_snd_hda_codec_write
	movl	(%r12), %esi
	movq	_VENDOR_CHIPIO_PORT_ALLOC_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MEM_CONNID_DSP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_snd_hda_codec_write
	movl	(%r14), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_chipio_send
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movl	(%r12), %esi
	movq	_VENDOR_CHIPIO_PORT_ALLOC_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VENDOR_CHIPIO_STATUS,4,2       ## @VENDOR_CHIPIO_STATUS
	.comm	_WIDGET_CHIP_CTRL,4,2           ## @WIDGET_CHIP_CTRL
	.comm	_VENDOR_CHIPIO_PORT_ALLOC_CONFIG_SET,4,2 ## @VENDOR_CHIPIO_PORT_ALLOC_CONFIG_SET
	.comm	_VENDOR_CHIPIO_PORT_ALLOC_SET,4,2 ## @VENDOR_CHIPIO_PORT_ALLOC_SET
	.comm	_MEM_CONNID_DSP,4,2             ## @MEM_CONNID_DSP
	.comm	_VENDOR_CHIPIO_PORT_ALLOC_GET,4,2 ## @VENDOR_CHIPIO_PORT_ALLOC_GET
	.no_dead_strip	_dsp_allocate_router_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsp_allocate_router_ports
_dsp_allocate_router_ports:             ; @dsp_allocate_router_ports
	.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	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _VENDOR_CHIPIO_STATUS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VENDOR_CHIPIO_STATUS@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w2, #0
	bl	_chipio_send
	tbnz	w0, #31, LBB0_3
; %bb.1:
	lsl	w8, w23, #4
	sub	w8, w8, #16
	sub	w9, w22, #1
	orr	w8, w8, w9
	orr	w4, w8, w21, lsl #6
Lloh2:
	adrp	x21, _WIDGET_CHIP_CTRL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _WIDGET_CHIP_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh4:
	adrp	x8, _VENDOR_CHIPIO_PORT_ALLOC_CONFIG_SET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VENDOR_CHIPIO_PORT_ALLOC_CONFIG_SET@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_snd_hda_codec_write
	ldr	w1, [x21]
Lloh7:
	adrp	x8, _VENDOR_CHIPIO_PORT_ALLOC_SET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VENDOR_CHIPIO_PORT_ALLOC_SET@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
Lloh10:
	adrp	x8, _MEM_CONNID_DSP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MEM_CONNID_DSP@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_snd_hda_codec_write
	ldr	w1, [x24]
	mov	x0, x20
	mov	w2, #0
	bl	_chipio_send
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	w1, [x21]
Lloh13:
	adrp	x8, _VENDOR_CHIPIO_PORT_ALLOC_GET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VENDOR_CHIPIO_PORT_ALLOC_GET@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
	str	w0, [x19]
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_3:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_CHIPIO_STATUS,4,2       ; @VENDOR_CHIPIO_STATUS
	.comm	_WIDGET_CHIP_CTRL,4,2           ; @WIDGET_CHIP_CTRL
	.comm	_VENDOR_CHIPIO_PORT_ALLOC_CONFIG_SET,4,2 ; @VENDOR_CHIPIO_PORT_ALLOC_CONFIG_SET
	.comm	_VENDOR_CHIPIO_PORT_ALLOC_SET,4,2 ; @VENDOR_CHIPIO_PORT_ALLOC_SET
	.comm	_MEM_CONNID_DSP,4,2             ; @MEM_CONNID_DSP
	.comm	_VENDOR_CHIPIO_PORT_ALLOC_GET,4,2 ; @VENDOR_CHIPIO_PORT_ALLOC_GET
	.no_dead_strip	_dsp_allocate_router_ports
.subsections_via_symbols
