	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_ih_get_wptr
_vega10_ih_get_wptr:                    ## @vega10_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
	subq	$24, %rsp
	.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, %r13d
	movq	_IH_RB_WPTR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_RB_OVERFLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	callq	_REG_GET_FIELD
	testl	%eax, %eax
	je	LBB0_19
## %bb.1:
	leaq	32(%r15), %rcx
	cmpq	%r14, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.4:
	leaq	16(%r15), %rax
	cmpq	%r14, %rax
	je	LBB0_5
## %bb.6:
	cmpq	%r14, %r15
	je	LBB0_7
## %bb.8:
	xorl	%eax, %eax
	callq	_BUG
                                        ## implicit-def: $edi
	jmp	LBB0_9
LBB0_2:
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_WPTR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_WPTR_RING1@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_WPTR_RING2@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
LBB0_9:
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_RREG32_NO_KIQ
	movl	%eax, %r13d
	movl	(%rbx), %esi
	movq	_RB_OVERFLOW@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%eax, %edi
	callq	_REG_GET_FIELD
	testl	%eax, %eax
	je	LBB0_19
## %bb.10:
	movl	(%rbx), %esi
	movl	(%r12), %edx
	movl	%r13d, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	%eax, %r13d
	leal	32(%r13), %ebx
	andl	(%r14), %ebx
	movl	48(%r15), %edi
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movl	%ebx, %r8d
	callq	_dev_warn
	movl	%ebx, 4(%r14)
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_11
## %bb.13:
	leaq	16(%r15), %rax
	cmpq	%r14, %rax
	je	LBB0_14
## %bb.15:
	cmpq	%r14, %r15
	je	LBB0_16
## %bb.17:
	xorl	%eax, %eax
	callq	_BUG
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_18
LBB0_11:
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_CNTL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_14:
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_CNTL_RING1@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_16:
	movq	_OSSSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmIH_RB_CNTL_RING2@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %ebx
LBB0_18:
	movl	%ebx, %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	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32_NO_KIQ
LBB0_19:
	andl	(%r14), %r13d
	movl	%r13d, %eax
	addq	$24, %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
	.comm	_mmIH_RB_WPTR_RING1,4,2         ## @mmIH_RB_WPTR_RING1
	.comm	_mmIH_RB_WPTR_RING2,4,2         ## @mmIH_RB_WPTR_RING2
	.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	_mmIH_RB_CNTL_RING1,4,2         ## @mmIH_RB_CNTL_RING1
	.comm	_mmIH_RB_CNTL_RING2,4,2         ## @mmIH_RB_CNTL_RING2
	.comm	_IH_RB_CNTL,4,2                 ## @IH_RB_CNTL
	.comm	_WPTR_OVERFLOW_CLEAR,4,2        ## @WPTR_OVERFLOW_CLEAR
	.no_dead_strip	_vega10_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 vega10_ih_get_wptr
_vega10_ih_get_wptr:                    ; @vega10_ih_get_wptr
	.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	x19, x1
	mov	x21, x0
	ldr	x8, [x1, #8]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	mov	x20, x0
Lloh0:
	adrp	x23, _IH_RB_WPTR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IH_RB_WPTR@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x25, _RB_OVERFLOW@GOTPAGE
Lloh3:
	ldr	x25, [x25, _RB_OVERFLOW@GOTPAGEOFF]
	ldr	w2, [x25]
	bl	_REG_GET_FIELD
	cbz	w0, LBB0_19
; %bb.1:
	add	x24, x21, #32
	cmp	x24, x19
	b.eq	LBB0_5
; %bb.2:
	add	x8, x21, #16
	cmp	x8, x19
	b.eq	LBB0_6
; %bb.3:
	cmp	x21, x19
	b.eq	LBB0_7
; %bb.4:
	bl	_BUG
                                        ; implicit-def: $w22
	b	LBB0_9
LBB0_5:
Lloh4:
	adrp	x8, _OSSSYS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OSSSYS@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _mmIH_RB_WPTR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mmIH_RB_WPTR@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh9:
	adrp	x8, _OSSSYS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OSSSYS@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _mmIH_RB_WPTR_RING1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _mmIH_RB_WPTR_RING1@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _OSSSYS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OSSSYS@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _mmIH_RB_WPTR_RING2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mmIH_RB_WPTR_RING2@GOTPAGEOFF]
LBB0_8:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x22, x0
LBB0_9:
	mov	x0, x22
	bl	_RREG32_NO_KIQ
	mov	x20, x0
	ldr	w1, [x23]
	ldr	w2, [x25]
	bl	_REG_GET_FIELD
	cbz	w0, LBB0_19
; %bb.10:
	ldr	w1, [x23]
	ldr	w2, [x25]
	mov	x0, x20
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x20, x0
	add	w8, w0, #32
	ldp	w9, w3, [x19]
	and	w23, w8, w9
	ldr	w0, [x21, #48]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x4, x23
	bl	_dev_warn
	str	w23, [x19, #4]
	cmp	x24, x19
	b.eq	LBB0_14
; %bb.11:
	add	x8, x21, #16
	cmp	x8, x19
	b.eq	LBB0_15
; %bb.12:
	cmp	x21, x19
	b.eq	LBB0_16
; %bb.13:
	bl	_BUG
	b	LBB0_18
LBB0_14:
Lloh21:
	adrp	x8, _OSSSYS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OSSSYS@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x8, _mmIH_RB_CNTL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mmIH_RB_CNTL@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh26:
	adrp	x8, _OSSSYS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _OSSSYS@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x8, _mmIH_RB_CNTL_RING1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mmIH_RB_CNTL_RING1@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh31:
	adrp	x8, _OSSSYS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _OSSSYS@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x8, _mmIH_RB_CNTL_RING2@GOTPAGE
Lloh35:
	ldr	x8, [x8, _mmIH_RB_CNTL_RING2@GOTPAGEOFF]
LBB0_17:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x22, x0
LBB0_18:
	mov	x0, x22
	bl	_RREG32_NO_KIQ
Lloh36:
	adrp	x8, _IH_RB_CNTL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _IH_RB_CNTL@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x8, _WPTR_OVERFLOW_CLEAR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _WPTR_OVERFLOW_CLEAR@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x1, x0
	mov	x0, x22
	bl	_WREG32_NO_KIQ
LBB0_19:
	ldr	w8, [x19]
	and	w0, w8, w20
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.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
	.comm	_mmIH_RB_WPTR_RING1,4,2         ; @mmIH_RB_WPTR_RING1
	.comm	_mmIH_RB_WPTR_RING2,4,2         ; @mmIH_RB_WPTR_RING2
	.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	_mmIH_RB_CNTL_RING1,4,2         ; @mmIH_RB_CNTL_RING1
	.comm	_mmIH_RB_CNTL_RING2,4,2         ; @mmIH_RB_CNTL_RING2
	.comm	_IH_RB_CNTL,4,2                 ; @IH_RB_CNTL
	.comm	_WPTR_OVERFLOW_CLEAR,4,2        ; @WPTR_OVERFLOW_CLEAR
	.no_dead_strip	_vega10_ih_get_wptr
.subsections_via_symbols
