	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_get_ring_head           ## -- Begin function radeon_get_ring_head
	.p2align	4, 0x90
_radeon_get_ring_head:                  ## @radeon_get_ring_head
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.5:
	xorl	%esi, %esi
	popq	%rbp
	jmp	_radeon_read_ring_rptr          ## TAILCALL
LBB0_1:
	movq	_RADEON_FAMILY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rdi), %eax
	movq	_CHIP_R600@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_2
## %bb.4:
	movq	_RADEON_CP_RB_RPTR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_R600_CP_RB_RPTR@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	popq	%rbp
	jmp	_RADEON_READ                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_FAMILY_MASK,4,2         ## @RADEON_FAMILY_MASK
	.comm	_CHIP_R600,4,2                  ## @CHIP_R600
	.comm	_R600_CP_RB_RPTR,4,2            ## @R600_CP_RB_RPTR
	.comm	_RADEON_CP_RB_RPTR,4,2          ## @RADEON_CP_RB_RPTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_get_ring_head           ; -- Begin function radeon_get_ring_head
	.p2align	2
_radeon_get_ring_head:                  ; @radeon_get_ring_head
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w1, #0
	b	_radeon_read_ring_rptr
LBB0_2:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _RADEON_FAMILY_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_FAMILY_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _CHIP_R600@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHIP_R600@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _RADEON_CP_RB_RPTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RADEON_CP_RB_RPTR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	_RADEON_READ
LBB0_4:
Lloh9:
	adrp	x8, _R600_CP_RB_RPTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R600_CP_RB_RPTR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	_RADEON_READ
	.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	_RADEON_FAMILY_MASK,4,2         ; @RADEON_FAMILY_MASK
	.comm	_CHIP_R600,4,2                  ; @CHIP_R600
	.comm	_R600_CP_RB_RPTR,4,2            ; @R600_CP_RB_RPTR
	.comm	_RADEON_CP_RB_RPTR,4,2          ; @RADEON_CP_RB_RPTR
.subsections_via_symbols
