	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ring_test_lockup        ## -- Begin function radeon_ring_test_lockup
	.p2align	4, 0x90
_radeon_ring_test_lockup:               ## @radeon_ring_test_lockup
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_radeon_ring_get_rptr
	movq	%rax, %r12
	leaq	8(%rbx), %rdi
	callq	_atomic64_read
	movq	%rax, %r15
	leaq	4(%rbx), %rdi
	callq	_atomic_read
	cmpq	%rax, %r12
	jne	LBB0_1
## %bb.2:
	movq	_jiffies_64@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	subq	%r15, %rdi
	callq	_jiffies_to_msecs
	movq	_radeon_lockup_timeout@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	xorl	%ecx, %ecx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.3:
	cmpq	%rdx, %rax
	jl	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rcx
	callq	_dev_err
	movl	$1, %ecx
	jmp	LBB0_5
LBB0_1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_radeon_ring_lockup_update
	xorl	%ecx, %ecx
LBB0_5:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies_64,8,3                 ## @jiffies_64
	.comm	_radeon_lockup_timeout,8,3      ## @radeon_lockup_timeout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ring %d stalled for more than %llumsec\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ring_test_lockup        ; -- Begin function radeon_ring_test_lockup
	.p2align	2
_radeon_ring_test_lockup:               ; @radeon_ring_test_lockup
	.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
	bl	_radeon_ring_get_rptr
	mov	x22, x0
	add	x0, x19, #8
	bl	_atomic64_read
	mov	x21, x0
	add	x0, x19, #4
	bl	_atomic_read
	cmp	x22, x0
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _jiffies_64@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies_64@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	x0, x8, x21
	bl	_jiffies_to_msecs
Lloh3:
	adrp	x8, _radeon_lockup_timeout@GOTPAGE
Lloh4:
	ldr	x8, [x8, _radeon_lockup_timeout@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, #0
	ccmp	x0, x8, #8, ne
	b.ge	LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_ring_lockup_update
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	x3, x0
	ldr	w0, [x20]
	ldr	w2, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #1
LBB0_5:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies_64,8,3                 ; @jiffies_64
	.comm	_radeon_lockup_timeout,8,3      ; @radeon_lockup_timeout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ring %d stalled for more than %llumsec\n"

.subsections_via_symbols
