	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	16(%rsi), %rsi
	movq	%r15, %rdi
	callq	_time_after
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	24(%rbx), %edi
	callq	_RREG32
	andl	4(%rbx), %eax
	movb	8(%rbx), %cl
	sarl	%cl, %eax
	movl	%eax, (%rbx)
	cmpl	12(%rbx), %eax
	jne	LBB0_1
## %bb.3:
	subq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_jiffies_to_msecs
	movq	%rax, %rdx
	movq	_radeon_lockup_timeout@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	cmpq	%rcx, %rdx
	jb	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	$1, %eax
	jmp	LBB0_6
LBB0_1:
	movq	%rbx, %rdi
	callq	_radeon_ring_lockup_update
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_radeon_lockup_timeout,8,3      ## @radeon_lockup_timeout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPU lockup CP stall for more than %lumsec\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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	x1, [x1, #16]
	mov	x0, x21
	bl	_time_after
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x20, #24]
	bl	_RREG32
	ldp	w8, w9, [x20, #4]
	and	w8, w8, w0
	asr	w8, w8, w9
	str	w8, [x20]
	ldr	w9, [x20, #12]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x20, #16]
	sub	x0, x21, x8
	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, #0, ne
	b.lo	LBB0_5
; %bb.3:
	mov	x2, x0
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #1
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_radeon_ring_lockup_update
LBB0_5:
	mov	w0, #0
LBB0_6:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_radeon_lockup_timeout,8,3      ; @radeon_lockup_timeout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPU lockup CP stall for more than %lumsec\n"

.subsections_via_symbols
