	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function azx_pcm_open
_azx_pcm_open:                          ## @azx_pcm_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r12
	movq	8(%rax), %r13
	movq	16(%rax), %rax
	movq	(%rbx), %rcx
	movq	8(%rbx), %r14
	movq	(%rax,%rcx,8), %r15
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_azx_assign_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_azx_pcm_hw@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movups	%xmm0, 8(%r14)
	movups	16(%r15), %xmm0
	movups	%xmm0, 8(%r14)
	movq	%r14, %rdi
	callq	_snd_pcm_limit_hw_rates
	movq	_SNDRV_PCM_HW_PARAM_PERIODS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_snd_pcm_hw_constraint_integer
	cmpq	$0, 8(%r13)
	movl	$4, %eax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	$128, %ebx
	cmovel	%eax, %ebx
	movq	_SNDRV_PCM_HW_PARAM_BUFFER_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %ecx
	callq	_snd_pcm_hw_constraint_step
	movq	_SNDRV_PCM_HW_PARAM_PERIOD_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %ecx
	callq	_snd_pcm_hw_constraint_step
	movl	(%r12), %edi
	callq	_snd_hda_power_up_d3wait
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	callq	*(%r15)
	movq	%r13, %r14
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_snd_pcm_limit_hw_rates
	xorl	%edi, %edi
	cmpl	$0, 20(%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	xorl	%edi, %edi
	cmpl	$0, 16(%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	xorl	%edi, %edi
	cmpl	$0, 12(%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	leaq	8(%rbx), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_10
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_azx_release_device
	movl	(%r12), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	*8(%rdi)
	movl	(%r12), %edi
	callq	_snd_hda_power_down
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_4:
	movl	%eax, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_azx_release_device
	movl	(%r12), %edi
	callq	_snd_hda_power_down
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %r15
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r14, 8(%r13)
	movq	$0, (%r13)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r13, (%rbx)
	movq	%r14, %rdi
	callq	_snd_pcm_set_sync
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%r13d, %r13d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_azx_pcm_hw,16,2                ## @azx_pcm_hw
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ## @SNDRV_PCM_HW_PARAM_PERIODS
	.comm	_SNDRV_PCM_HW_PARAM_BUFFER_BYTES,4,2 ## @SNDRV_PCM_HW_PARAM_BUFFER_BYTES
	.comm	_SNDRV_PCM_HW_PARAM_PERIOD_BYTES,4,2 ## @SNDRV_PCM_HW_PARAM_PERIOD_BYTES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_azx_pcm_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function azx_pcm_open
_azx_pcm_open:                          ; @azx_pcm_open
	.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
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x21, x0
	ldp	x19, x8, [x0, #8]
	ldp	x9, x22, [x20]
	ldr	x24, [x8, x9, lsl #3]
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x20
	bl	_azx_assign_device
	cbz	x0, LBB0_7
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x8, _azx_pcm_hw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _azx_pcm_hw@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	stur	q0, [x22, #8]
	ldr	q0, [x24, #16]
	stur	q0, [x22, #8]
	mov	x0, x22
	bl	_snd_pcm_limit_hw_rates
Lloh3:
	adrp	x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_snd_pcm_hw_constraint_integer
	ldr	x8, [x19, #8]
	cmp	x8, #0
	mov	w8, #128
	mov	w9, #4
	csel	w25, w9, w8, eq
Lloh6:
	adrp	x8, _SNDRV_PCM_HW_PARAM_BUFFER_BYTES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_BUFFER_BYTES@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	mov	x3, x25
	bl	_snd_pcm_hw_constraint_step
Lloh9:
	adrp	x8, _SNDRV_PCM_HW_PARAM_PERIOD_BYTES@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_PERIOD_BYTES@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	mov	x3, x25
	bl	_snd_pcm_hw_constraint_step
	ldr	w0, [x21]
	bl	_snd_hda_power_up_d3wait
	ldr	x8, [x24]
	ldr	w1, [x21]
	mov	x0, x24
	mov	x2, x20
	blr	x8
	tbnz	w0, #31, LBB0_9
; %bb.2:
	mov	x0, x22
	bl	_snd_pcm_limit_hw_rates
	ldr	w8, [x22, #20]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_6
; %bb.3:
	ldr	w8, [x22, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	w8, [x22, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_6
; %bb.5:
	add	x8, x22, #8
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_11
LBB0_6:
	mov	x0, x23
	bl	_azx_release_device
	ldr	x8, [x24, #8]
	ldr	w1, [x21]
	mov	x0, x24
	mov	x2, x20
	blr	x8
	ldr	w0, [x21]
	bl	_snd_hda_power_down
	mov	x0, x19
	bl	_mutex_unlock
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_10
LBB0_9:
	mov	x25, x0
	mov	x0, x23
	bl	_azx_release_device
	ldr	w0, [x21]
	bl	_snd_hda_power_down
	mov	x0, x19
	bl	_mutex_unlock
LBB0_10:
	mov	x0, x25
	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
LBB0_11:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	stp	xzr, x20, [x23]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	str	x23, [x22]
	mov	x0, x20
	bl	_snd_pcm_set_sync
	mov	x0, x19
	bl	_mutex_unlock
	mov	w25, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_azx_pcm_hw,16,2                ; @azx_pcm_hw
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ; @SNDRV_PCM_HW_PARAM_PERIODS
	.comm	_SNDRV_PCM_HW_PARAM_BUFFER_BYTES,4,2 ; @SNDRV_PCM_HW_PARAM_BUFFER_BYTES
	.comm	_SNDRV_PCM_HW_PARAM_PERIOD_BYTES,4,2 ; @SNDRV_PCM_HW_PARAM_PERIOD_BYTES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_azx_pcm_open
.subsections_via_symbols
