	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdacf_pcm_trigger
_pdacf_pcm_trigger:                     ## @pdacf_pcm_trigger
	.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	%esi, %r15d
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r12
	movq	_PDAUDIOCF_STAT_IS_STALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_3:
	addl	$-128, %r15d
	cmpl	$5, %r15d
	ja	LBB0_8
## %bb.4:
	movq	%r12, %r14
	movq	(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$35, %eax
	btl	%r15d, %eax
	jae	LBB0_5
## %bb.9:
	movq	_PDAUDIOCF_RECORD@GOTPCREL(%rip), %rax
	movzwl	(%rax), %r13d
	notl	%r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	$-1, %r15
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_5:
	movl	$24, %eax
	btl	%r15d, %eax
	jb	LBB0_7
## %bb.6:
	movq	$0, 32(%r14)
LBB0_7:
	movq	_PDAUDIOCF_RECORD@GOTPCREL(%rip), %rax
	movzwl	(%rax), %ebx
	movq	8(%r14), %rdi
	movq	_AK4117_CHECK_NO_STAT@GOTPCREL(%rip), %rax
	movq	_AK4117_CHECK_NO_RATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_snd_ak4117_check_rate_and_errors
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movw	$-1, %r13w
	movl	$1, %r15d
LBB0_10:
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_spin_lock
	addq	%r15, 24(%r14)
	movq	_PDAUDIOCF_REG_SCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pdacf_reg_read
                                        ## kill: def $ax killed $ax def $eax
	movq	24(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.11:
	movq	8(%r14), %rdx
	movq	_AK4117_UNLCK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rdx)
	jne	LBB0_13
## %bb.12:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	%esi, (%rdx)
	jne	LBB0_13
LBB0_14:
	andl	%r13d, %eax
	orl	%eax, %ebx
	movq	_PDAUDIOCF_REG_SCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%bx, %edx
	movq	%r14, %rdi
	callq	_pdacf_reg_write
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_13:
	subq	%r15, %rcx
	movq	%rcx, 24(%r14)
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movq	%r12, %rdi
	callq	_spin_unlock
	movq	8(%r14), %rdi
	movq	_AK4117_CHECK_NO_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_snd_ak4117_check_rate_and_errors
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_PDAUDIOCF_STAT_IS_STALE,4,2    ## @PDAUDIOCF_STAT_IS_STALE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PDAUDIOCF_RECORD,2,1           ## @PDAUDIOCF_RECORD
	.comm	_AK4117_CHECK_NO_STAT,4,2       ## @AK4117_CHECK_NO_STAT
	.comm	_AK4117_CHECK_NO_RATE,4,2       ## @AK4117_CHECK_NO_RATE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PDAUDIOCF_REG_SCR,4,2          ## @PDAUDIOCF_REG_SCR
	.comm	_AK4117_UNLCK,4,2               ## @AK4117_UNLCK
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_pdacf_pcm_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdacf_pcm_trigger
_pdacf_pcm_trigger:                     ; @pdacf_pcm_trigger
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _PDAUDIOCF_STAT_IS_STALE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PDAUDIOCF_STAT_IS_STALE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_15
LBB0_3:
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_16
; %bb.4:
	mov	x19, x0
	ldr	x23, [x20]
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #35
Lloh5:
	adrp	x22, _AK4117_CHECK_NO_RATE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AK4117_CHECK_NO_RATE@GOTPAGEOFF]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.5:
	mov	w20, #0
	mov	w24, #0
Lloh7:
	adrp	x8, _PDAUDIOCF_RECORD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PDAUDIOCF_RECORD@GOTPAGEOFF]
	ldrh	w8, [x8]
	mvn	w25, w8
	mov	x26, #-1
	b	LBB0_9
LBB0_6:
	tst	w8, #0x18
	b.ne	LBB0_8
; %bb.7:
	str	xzr, [x19, #32]
LBB0_8:
Lloh9:
	adrp	x8, _PDAUDIOCF_RECORD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PDAUDIOCF_RECORD@GOTPAGEOFF]
	ldrh	w24, [x8]
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x8, _AK4117_CHECK_NO_STAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AK4117_CHECK_NO_STAT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w1, w9, w8
	bl	_snd_ak4117_check_rate_and_errors
	mov	x20, x0
	mov	w25, #65535
	mov	w26, #1
LBB0_9:
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock
	ldr	x8, [x19, #24]
	add	x8, x8, x26
	str	x8, [x19, #24]
Lloh14:
	adrp	x27, _PDAUDIOCF_REG_SCR@GOTPAGE
Lloh15:
	ldr	x27, [x27, _PDAUDIOCF_REG_SCR@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x19
	bl	_pdacf_reg_read
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_12
; %bb.10:
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _AK4117_UNLCK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AK4117_UNLCK@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_13
; %bb.11:
	ldr	w9, [x23]
	cmp	w9, w20
	b.ne	LBB0_13
LBB0_12:
	and	w8, w0, w25
	orr	w2, w8, w24
	ldr	w1, [x27]
	mov	x0, x19
	bl	_pdacf_reg_write
	mov	w20, #0
	b	LBB0_14
LBB0_13:
	sub	x8, x8, x26
	str	x8, [x19, #24]
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_14:
	mov	x0, x21
	bl	_spin_unlock
	ldr	x0, [x19, #8]
	ldr	w1, [x22]
	bl	_snd_ak4117_check_rate_and_errors
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PDAUDIOCF_STAT_IS_STALE,4,2    ; @PDAUDIOCF_STAT_IS_STALE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PDAUDIOCF_RECORD,2,1           ; @PDAUDIOCF_RECORD
	.comm	_AK4117_CHECK_NO_STAT,4,2       ; @AK4117_CHECK_NO_STAT
	.comm	_AK4117_CHECK_NO_RATE,4,2       ; @AK4117_CHECK_NO_RATE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PDAUDIOCF_REG_SCR,4,2          ; @PDAUDIOCF_REG_SCR
	.comm	_AK4117_UNLCK,4,2               ; @AK4117_UNLCK
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_pdacf_pcm_trigger
.subsections_via_symbols
