	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function azx_assign_device
_azx_assign_device:                     ## @azx_assign_device
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	4(%rsi), %eax
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	xorl	%edx, %edx
	cmpl	%r8d, %eax
	setne	%dl
	movl	4(%rdi,%rdx,8), %ebx
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.1:
	movq	8(%rsi), %rdx
	movl	(%rdx), %edx
	shll	$16, %edx
	movl	(%rsi), %esi
	shll	$2, %esi
	leal	1(%rax), %ecx
	orl	%esi, %ecx
	orl	%edx, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	cmpl	%r8d, %eax
	setne	%dl
	movslq	(%rdi,%rdx,8), %r12
	shlq	$3, %r12
	movq	%r12, %r14
	xorq	$-4, %r14
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_dsp_unlock
	addq	$-8, %r14
	addq	$8, %r12
	decl	%ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rdi), %r15
	leaq	(%r15,%r12), %r13
	movq	%r13, %rdi
	callq	_dsp_lock
	cmpl	$0, (%r15,%r12)
	jne	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_dsp_is_locked
	testl	%eax, %eax
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, 4(%r15,%r12)
	jne	LBB0_2
## %bb.6:
	movl	$1, (%r15,%r12)
	subq	%r14, %r15
	jmp	LBB0_9
LBB0_7:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_11
## %bb.8:
	movq	%r13, %rdi
	callq	_dsp_lock
	movl	$1, (%r13)
	leaq	4(%r13), %r15
LBB0_9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	movq	%r13, %rdi
	callq	_dsp_unlock
	jmp	LBB0_12
LBB0_11:
	xorl	%r13d, %r13d
LBB0_12:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ## @SNDRV_PCM_STREAM_PLAYBACK
	.no_dead_strip	_azx_assign_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function azx_assign_device
_azx_assign_device:                     ; @azx_assign_device
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x1, #4]
Lloh0:
	adrp	x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	mov	w10, #12
	mov	w11, #4
	csel	x10, x11, x10, eq
	ldr	w23, [x0, x10]
	cmp	w23, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x20, x0
	mov	x19, #0
	ldr	x10, [x1, #8]
	ldr	w10, [x10]
	ldr	w11, [x1]
	lsl	w11, w11, #2
	orr	w10, w11, w10, lsl #16
	add	w11, w8, #1
	orr	w22, w10, w11
	cmp	w8, w9
	cset	w8, ne
	lsl	x8, x8, #3
	ldrsw	x8, [x0, x8]
	lsl	x24, x8, #3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_dsp_unlock
	add	x24, x24, #8
	subs	w23, w23, #1
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x20, #16]
	add	x21, x25, x24
	mov	x0, x21
	bl	_dsp_lock
	ldr	w8, [x21]
	cbnz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_dsp_is_locked
	cbnz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x25, x24
	ldr	w8, [x9, #4]
	mov	x19, x21
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.6:
	mov	w10, #1
	mov	x8, x9
	str	w10, [x8], #4
	mov	x19, x9
	b	LBB0_9
LBB0_7:
	cbz	x19, LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_dsp_lock
	mov	w9, #1
	mov	x8, x19
	str	w9, [x8], #4
LBB0_9:
	str	w22, [x8]
	mov	x0, x19
	bl	_dsp_unlock
	b	LBB0_11
LBB0_10:
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ; @SNDRV_PCM_STREAM_PLAYBACK
	.no_dead_strip	_azx_assign_device
.subsections_via_symbols
