	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ring_free_size          ## -- Begin function radeon_ring_free_size
	.p2align	4, 0x90
_radeon_ring_free_size:                 ## @radeon_ring_free_size
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	movq	(%rdi), %rax
	sarl	$2, %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_le32_to_cpu
	jmp	LBB0_3
LBB0_2:
	movl	40(%rbx), %edi
	callq	_RREG32
LBB0_3:
	andl	8(%rbx), %eax
	movb	12(%rbx), %cl
	sarl	%cl, %eax
	movl	%eax, 4(%rbx)
	movl	20(%rbx), %ecx
	leal	3(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$2, %edx
	addl	%edx, %eax
	subl	32(%rbx), %eax
	andl	24(%rbx), %eax
	cmovel	%edx, %eax
	movl	%eax, 16(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ring_free_size          ; -- Begin function radeon_ring_free_size
	.p2align	2
_radeon_ring_free_size:                 ; @radeon_ring_free_size
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x0]
	ldr	w9, [x19]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #2
	ldr	w0, [x8, w9, sxtw #2]
	bl	_le32_to_cpu
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19, #40]
	bl	_RREG32
LBB0_3:
	ldp	w8, w9, [x19, #8]
	and	w8, w8, w0
	asr	w8, w8, w9
	str	w8, [x19, #4]
	ldp	w9, w10, [x19, #20]
	add	w11, w9, #3
	cmp	w9, #0
	csel	w9, w11, w9, lt
	asr	w9, w9, #2
	ldr	w11, [x19, #32]
	add	w8, w9, w8
	sub	w8, w8, w11
	ands	w8, w8, w10
	csel	w8, w9, w8, eq
	str	w8, [x19, #16]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
