	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_trident_playback_pointer
_snd_trident_playback_pointer:          ## @snd_trident_playback_pointer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	(%rbx), %r12
	movq	8(%r12), %rbx
	cmpl	$0, 4(%rbx)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	(%rbx), %ebx
	movq	_T4D_LFO_GC_CIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_TRID_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	movq	(%r15), %rax
	movq	_TRIDENT_DEVICE_ID_NX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_CH_NX_DELTA_CSO@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_TRID_REG
	movl	%eax, %edi
	callq	_inl
	movq	%rax, %rbx
	andl	$16777215, %ebx                 ## imm = 0xFFFFFF
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_CH_DX_CSO_ALPHA_FMS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$2, %rsi
	movq	%r15, %rdi
	callq	_TRID_REG
	movl	%eax, %edi
	callq	_inw
	movl	%eax, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	cmpl	(%r12), %ebx
	cmovbl	%ebx, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_T4D_LFO_GC_CIR,8,3             ## @T4D_LFO_GC_CIR
	.comm	_TRIDENT_DEVICE_ID_NX,8,3       ## @TRIDENT_DEVICE_ID_NX
	.comm	_CH_DX_CSO_ALPHA_FMS,8,3        ## @CH_DX_CSO_ALPHA_FMS
	.comm	_CH_NX_DELTA_CSO,8,3            ## @CH_NX_DELTA_CSO
	.no_dead_strip	_snd_trident_playback_pointer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_trident_playback_pointer
_snd_trident_playback_pointer:          ; @snd_trident_playback_pointer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_snd_pcm_substream_chip
	ldr	x22, [x19]
	ldr	x21, [x22, #8]
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock
	ldr	w21, [x21]
Lloh0:
	adrp	x8, _T4D_LFO_GC_CIR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _T4D_LFO_GC_CIR@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_TRID_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outb
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _TRIDENT_DEVICE_ID_NX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TRIDENT_DEVICE_ID_NX@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _CH_NX_DELTA_CSO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CH_NX_DELTA_CSO@GOTPAGEOFF]
Lloh8:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_TRID_REG
	bl	_inl
	and	w20, w0, #0xffffff
	b	LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _CH_DX_CSO_ALPHA_FMS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CH_DX_CSO_ALPHA_FMS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x1, x8, #2
	mov	x0, x20
	bl	_TRID_REG
	bl	_inw
	mov	x20, x0
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock
	ldr	w8, [x22]
	cmp	w20, w8
	csel	w0, w20, wzr, lo
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_T4D_LFO_GC_CIR,8,3             ; @T4D_LFO_GC_CIR
	.comm	_TRIDENT_DEVICE_ID_NX,8,3       ; @TRIDENT_DEVICE_ID_NX
	.comm	_CH_DX_CSO_ALPHA_FMS,8,3        ; @CH_DX_CSO_ALPHA_FMS
	.comm	_CH_NX_DELTA_CSO,8,3            ; @CH_NX_DELTA_CSO
	.no_dead_strip	_snd_trident_playback_pointer
.subsections_via_symbols
