	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function navi10_ih_get_wptr
_navi10_ih_get_wptr:                    ## @navi10_ih_get_wptr
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movq	_IH_RB_WPTR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_RB_OVERFLOW@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%eax, %edi
	callq	_REG_GET_FIELD
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_WPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32_NO_KIQ
	movl	%eax, %ebx
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	%eax, %edi
	callq	_REG_GET_FIELD
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	%eax, %ebx
	leal	32(%rbx), %r12d
	andl	(%r14), %r12d
	movl	(%r15), %edi
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movl	%r12d, %r8d
	callq	_dev_warn
	movl	%r12d, 4(%r14)
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_RREG32_NO_KIQ
	movq	_IH_RB_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_WPTR_OVERFLOW_CLEAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_WREG32_NO_KIQ
LBB0_3:
	andl	(%r14), %ebx
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IH_RB_WPTR,4,2                 ## @IH_RB_WPTR
	.comm	_RB_OVERFLOW,4,2                ## @RB_OVERFLOW
	.comm	_OSSSYS,4,2                     ## @OSSSYS
	.comm	_mmIH_RB_WPTR,4,2               ## @mmIH_RB_WPTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IH ring buffer overflow (0x%08X, 0x%08X, 0x%08X)\n"

	.comm	_mmIH_RB_CNTL,4,2               ## @mmIH_RB_CNTL
	.comm	_IH_RB_CNTL,4,2                 ## @IH_RB_CNTL
	.comm	_WPTR_OVERFLOW_CLEAR,4,2        ## @WPTR_OVERFLOW_CLEAR
	.no_dead_strip	_navi10_ih_get_wptr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function navi10_ih_get_wptr
_navi10_ih_get_wptr:                    ; @navi10_ih_get_wptr
	.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, x1
	mov	x21, x0
	ldr	x8, [x1, #8]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	mov	x20, x0
Lloh0:
	adrp	x22, _IH_RB_WPTR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IH_RB_WPTR@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x24, _RB_OVERFLOW@GOTPAGE
Lloh3:
	ldr	x24, [x24, _RB_OVERFLOW@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_REG_GET_FIELD
	cbz	w0, LBB0_3
; %bb.1:
Lloh4:
	adrp	x23, _OSSSYS@GOTPAGE
Lloh5:
	ldr	x23, [x23, _OSSSYS@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh6:
	adrp	x8, _mmIH_RB_WPTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mmIH_RB_WPTR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32_NO_KIQ
	mov	x20, x0
	ldr	w1, [x22]
	ldr	w2, [x24]
	bl	_REG_GET_FIELD
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w1, [x22]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x20, x0
	add	w8, w0, #32
	ldp	w9, w3, [x19]
	and	w22, w8, w9
	ldr	w0, [x21]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x4, x22
	bl	_dev_warn
	str	w22, [x19, #4]
	ldr	w0, [x23]
Lloh11:
	adrp	x8, _mmIH_RB_CNTL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mmIH_RB_CNTL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x21, x0
	bl	_RREG32_NO_KIQ
Lloh14:
	adrp	x8, _IH_RB_CNTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IH_RB_CNTL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _WPTR_OVERFLOW_CLEAR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WPTR_OVERFLOW_CLEAR@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x1, x0
	mov	x0, x21
	bl	_WREG32_NO_KIQ
LBB0_3:
	ldr	w8, [x19]
	and	w0, w8, w20
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IH_RB_WPTR,4,2                 ; @IH_RB_WPTR
	.comm	_RB_OVERFLOW,4,2                ; @RB_OVERFLOW
	.comm	_OSSSYS,4,2                     ; @OSSSYS
	.comm	_mmIH_RB_WPTR,4,2               ; @mmIH_RB_WPTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IH ring buffer overflow (0x%08X, 0x%08X, 0x%08X)\n"

	.comm	_mmIH_RB_CNTL,4,2               ; @mmIH_RB_CNTL
	.comm	_IH_RB_CNTL,4,2                 ; @IH_RB_CNTL
	.comm	_WPTR_OVERFLOW_CLEAR,4,2        ; @WPTR_OVERFLOW_CLEAR
	.no_dead_strip	_navi10_ih_get_wptr
.subsections_via_symbols
