	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_fm801_playback_pointer
_snd_fm801_playback_pointer:            ## @snd_fm801_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, %r14
	callq	_snd_pcm_substream_chip
	movq	%rax, %rbx
	movq	_FM801_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.1:
	movq	%rbx, %r15
	addq	$24, %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movl	4(%rbx), %r12d
	movq	_PLY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	8(%rbx), %r12d
	movq	%rbx, %rdi
	callq	_FM801_REG
	movl	%eax, %edi
	callq	_inw
	notl	%eax
	addl	%r12d, %eax
	movslq	%eax, %r12
	movq	_IRQ_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_FM801_REG
	movl	%eax, %edi
	callq	_inw
	movq	_FM801_IRQ_PLAYBACK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.2:
	movslq	8(%rbx), %rax
	addq	%r12, %rax
	movq	16(%rbx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r12
	jmp	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %r12d
LBB0_5:
	movq	%r15, %rdi
	callq	_spin_unlock
	movl	(%r14), %edi
	movq	%r12, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bytes_to_frames                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FM801_START,4,2                ## @FM801_START
	.comm	_PLY_COUNT,4,2                  ## @PLY_COUNT
	.comm	_IRQ_STATUS,4,2                 ## @IRQ_STATUS
	.comm	_FM801_IRQ_PLAYBACK,4,2         ## @FM801_IRQ_PLAYBACK
	.no_dead_strip	_snd_fm801_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_fm801_playback_pointer
_snd_fm801_playback_pointer:            ; @snd_fm801_playback_pointer
	.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, x0
	bl	_snd_pcm_substream_chip
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FM801_START@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FM801_START@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x21, x0
	add	x20, x0, #24
	mov	x0, x20
	bl	_spin_lock
	ldp	w22, w23, [x21, #4]
Lloh3:
	adrp	x8, _PLY_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PLY_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_FM801_REG
	bl	_inw
	mvn	w8, w0
	add	w9, w22, w23
	add	w8, w8, w9
	sxtw	x22, w8
Lloh6:
	adrp	x8, _IRQ_STATUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_STATUS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_FM801_REG
	bl	_inw
Lloh9:
	adrp	x8, _FM801_IRQ_PLAYBACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FM801_IRQ_PLAYBACK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
	ldrsw	x8, [x21, #8]
	add	x8, x8, x22
	ldr	x9, [x21, #16]
	udiv	x10, x8, x9
	msub	x22, x10, x9, x8
LBB0_3:
	mov	x0, x20
	bl	_spin_unlock
	ldr	w0, [x19]
	mov	x1, x22
	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
	b	_bytes_to_frames
LBB0_4:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FM801_START,4,2                ; @FM801_START
	.comm	_PLY_COUNT,4,2                  ; @PLY_COUNT
	.comm	_IRQ_STATUS,4,2                 ; @IRQ_STATUS
	.comm	_FM801_IRQ_PLAYBACK,4,2         ; @FM801_IRQ_PLAYBACK
	.no_dead_strip	_snd_fm801_playback_pointer
.subsections_via_symbols
