	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function navi10_ih_rb_cntl
_navi10_ih_rb_cntl:                     ## @navi10_ih_rb_cntl
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	callq	_order_base_2
	movl	%eax, %r14d
	movq	_IH_RB_CNTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MC_SPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%eax, %eax
	cmpq	$0, 8(%rbx)
	sete	%al
	leal	(%rax,%rax,2), %ecx
	incl	%ecx
	movl	%r15d, %edi
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_WPTR_OVERFLOW_CLEAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_WPTR_OVERFLOW_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_RB_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%r14d, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_WPTR_WRITEBACK_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_MC_SNOOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_MC_RO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_MC_VMID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_SET_FIELD                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IH_RB_CNTL,4,2                 ## @IH_RB_CNTL
	.comm	_MC_SPACE,4,2                   ## @MC_SPACE
	.comm	_WPTR_OVERFLOW_CLEAR,4,2        ## @WPTR_OVERFLOW_CLEAR
	.comm	_WPTR_OVERFLOW_ENABLE,4,2       ## @WPTR_OVERFLOW_ENABLE
	.comm	_RB_SIZE,4,2                    ## @RB_SIZE
	.comm	_WPTR_WRITEBACK_ENABLE,4,2      ## @WPTR_WRITEBACK_ENABLE
	.comm	_MC_SNOOP,4,2                   ## @MC_SNOOP
	.comm	_MC_RO,4,2                      ## @MC_RO
	.comm	_MC_VMID,4,2                    ## @MC_VMID
	.no_dead_strip	_navi10_ih_rb_cntl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function navi10_ih_rb_cntl
_navi10_ih_rb_cntl:                     ; @navi10_ih_rb_cntl
	.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, x1
	mov	x20, x0
	ldr	w8, [x0]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #2
	bl	_order_base_2
	mov	x21, x0
Lloh0:
	adrp	x22, _IH_RB_CNTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IH_RB_CNTL@GOTPAGEOFF]
Lloh2:
	adrp	x8, _MC_SPACE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MC_SPACE@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh4:
	ldr	w2, [x8]
	ldr	x8, [x20, #8]
	cmp	x8, #0
	mov	w8, #4
	csinc	w3, w8, wzr, eq
	mov	x0, x19
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _WPTR_OVERFLOW_CLEAR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WPTR_OVERFLOW_CLEAR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _WPTR_OVERFLOW_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WPTR_OVERFLOW_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
Lloh11:
	adrp	x8, _RB_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RB_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x3, x21
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _WPTR_WRITEBACK_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WPTR_WRITEBACK_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
Lloh17:
	adrp	x8, _MC_SNOOP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MC_SNOOP@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
Lloh20:
	adrp	x8, _MC_RO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MC_RO@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_REG_SET_FIELD
Lloh23:
	adrp	x8, _MC_VMID@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MC_VMID@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh25:
	ldr	w2, [x8]
	mov	w3, #0
	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
	b	_REG_SET_FIELD
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IH_RB_CNTL,4,2                 ; @IH_RB_CNTL
	.comm	_MC_SPACE,4,2                   ; @MC_SPACE
	.comm	_WPTR_OVERFLOW_CLEAR,4,2        ; @WPTR_OVERFLOW_CLEAR
	.comm	_WPTR_OVERFLOW_ENABLE,4,2       ; @WPTR_OVERFLOW_ENABLE
	.comm	_RB_SIZE,4,2                    ; @RB_SIZE
	.comm	_WPTR_WRITEBACK_ENABLE,4,2      ; @WPTR_WRITEBACK_ENABLE
	.comm	_MC_SNOOP,4,2                   ; @MC_SNOOP
	.comm	_MC_RO,4,2                      ; @MC_RO
	.comm	_MC_VMID,4,2                    ; @MC_VMID
	.no_dead_strip	_navi10_ih_rb_cntl
.subsections_via_symbols
