	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ib_ring_tests           ## -- Begin function amdgpu_ib_ring_tests
	.p2align	4, 0x90
_amdgpu_ib_ring_tests:                  ## @amdgpu_ib_ring_tests
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_AMDGPU_IB_TEST_TIMEOUT@GOTPCREL(%rip), %r14
	movslq	(%r14), %rbx
	callq	_amdgpu_sriov_vf
	movslq	(%r14), %r15
	shlq	$3, %r15
	testq	%rax, %rax
	cmoveq	%rbx, %r15
	movq	%r13, %rdi
	callq	_amdgpu_sriov_runtime
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movslq	(%r14), %rbx
	shlq	$3, %rbx
	jmp	LBB0_4
LBB0_2:
	cmpq	$0, 32(%r13)
	je	LBB0_4
## %bb.3:
	movq	_AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_4:
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	16(%r13), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_DEBUG
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	movl	(%r13), %eax
	cmpq	%rax, %r14
	jae	LBB0_18
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movq	(%rax,%r14,8), %rbx
	cmpl	$0, 4(%rbx)
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rbx), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax), %rax
	movq	%r15, %rcx
	movq	_AMDGPU_RING_TYPE_VCN_JPEG@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rsi
	movq	_AMDGPU_RING_TYPE_VCN_ENC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rcx, %rsi
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_AMDGPU_RING_TYPE_VCN_DEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%r15, %rsi
	movq	_AMDGPU_RING_TYPE_UVD_ENC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%r15, %rsi
	movq	_AMDGPU_RING_TYPE_VCE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%r15, %rsi
	movq	_AMDGPU_RING_TYPE_UVD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%r15, %rsi
	movq	%rbx, %rdi
	callq	_amdgpu_ring_test_ib
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %r12d
	movl	$0, 4(%rbx)
	movl	16(%r13), %edi
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %ecx
	callq	_DRM_DEV_ERROR
	cmpq	8(%r13), %rbx
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_17
LBB0_5:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_18
LBB0_19:
	movl	$0, 4(%r13)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
LBB0_18:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_IB_TEST_TIMEOUT,4,2     ## @AMDGPU_IB_TEST_TIMEOUT
	.comm	_AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT,8,3 ## @AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT
	.comm	_AMDGPU_RING_TYPE_UVD,8,3       ## @AMDGPU_RING_TYPE_UVD
	.comm	_AMDGPU_RING_TYPE_VCE,8,3       ## @AMDGPU_RING_TYPE_VCE
	.comm	_AMDGPU_RING_TYPE_UVD_ENC,8,3   ## @AMDGPU_RING_TYPE_UVD_ENC
	.comm	_AMDGPU_RING_TYPE_VCN_DEC,8,3   ## @AMDGPU_RING_TYPE_VCN_DEC
	.comm	_AMDGPU_RING_TYPE_VCN_ENC,8,3   ## @AMDGPU_RING_TYPE_VCN_ENC
	.comm	_AMDGPU_RING_TYPE_VCN_JPEG,8,3  ## @AMDGPU_RING_TYPE_VCN_JPEG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ib test on %s succeeded\n"

L_.str.1:                               ## @.str.1
	.asciz	"IB test failed on %s (%d).\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ib_ring_tests           ; -- Begin function amdgpu_ib_ring_tests
	.p2align	2
_amdgpu_ib_ring_tests:                  ; @amdgpu_ib_ring_tests
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x21, _AMDGPU_IB_TEST_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AMDGPU_IB_TEST_TIMEOUT@GOTPAGEOFF]
	ldrsw	x20, [x21]
	bl	_amdgpu_sriov_vf
	ldrsw	x8, [x21]
	lsl	x8, x8, #3
	cmp	x0, #0
	csel	x25, x20, x8, eq
	mov	x0, x19
	bl	_amdgpu_sriov_runtime
	cbz	x0, LBB0_10
; %bb.1:
	ldrsw	x8, [x21]
	lsl	x26, x8, #3
	ldr	w8, [x19]
	cbz	w8, LBB0_11
LBB0_2:
	mov	x27, #0
	mov	w22, #0
Lloh2:
	adrp	x28, _AMDGPU_RING_TYPE_VCN_DEC@GOTPAGE
Lloh3:
	ldr	x28, [x28, _AMDGPU_RING_TYPE_VCN_DEC@GOTPAGEOFF]
Lloh4:
	adrp	x20, _AMDGPU_RING_TYPE_VCN_ENC@GOTPAGE
Lloh5:
	ldr	x20, [x20, _AMDGPU_RING_TYPE_VCN_ENC@GOTPAGEOFF]
Lloh6:
	adrp	x21, _AMDGPU_RING_TYPE_VCN_JPEG@GOTPAGE
Lloh7:
	ldr	x21, [x21, _AMDGPU_RING_TYPE_VCN_JPEG@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #16]
	ldr	w2, [x23]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_DEBUG
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	ldr	w8, [x19]
	cmp	x27, x8
	b.hs	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x23, [x8, x27, lsl #3]
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x23, #8]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _AMDGPU_RING_TYPE_UVD@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AMDGPU_RING_TYPE_UVD@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x10, _AMDGPU_RING_TYPE_VCE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _AMDGPU_RING_TYPE_VCE@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
Lloh16:
	adrp	x11, _AMDGPU_RING_TYPE_UVD_ENC@GOTPAGE
Lloh17:
	ldr	x11, [x11, _AMDGPU_RING_TYPE_UVD_ENC@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
	ldr	x12, [x28]
	ldr	x13, [x20]
	ldr	x14, [x21]
	cmp	x8, x14
	ccmp	x8, x13, #4, ne
	ccmp	x8, x12, #4, ne
	ccmp	x8, x11, #4, ne
	ccmp	x8, x10, #4, ne
	ccmp	x8, x9, #4, ne
	csel	x1, x25, x26, eq
	mov	x0, x23
	bl	_amdgpu_ring_test_ib
	cbz	w0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	str	wzr, [x23, #4]
	ldr	w0, [x19, #16]
	ldr	w2, [x23]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x24
	bl	_DRM_DEV_ERROR
	ldr	x8, [x19, #8]
	cmp	x23, x8
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x24
	b	LBB0_4
LBB0_10:
	ldr	x8, [x19, #32]
Lloh21:
	adrp	x9, _AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x26, x20, x9, eq
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
LBB0_11:
	mov	w22, #0
	b	LBB0_13
LBB0_12:
	str	wzr, [x19, #4]
	mov	x22, x24
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_IB_TEST_TIMEOUT,4,2     ; @AMDGPU_IB_TEST_TIMEOUT
	.comm	_AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT,8,3 ; @AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT
	.comm	_AMDGPU_RING_TYPE_UVD,8,3       ; @AMDGPU_RING_TYPE_UVD
	.comm	_AMDGPU_RING_TYPE_VCE,8,3       ; @AMDGPU_RING_TYPE_VCE
	.comm	_AMDGPU_RING_TYPE_UVD_ENC,8,3   ; @AMDGPU_RING_TYPE_UVD_ENC
	.comm	_AMDGPU_RING_TYPE_VCN_DEC,8,3   ; @AMDGPU_RING_TYPE_VCN_DEC
	.comm	_AMDGPU_RING_TYPE_VCN_ENC,8,3   ; @AMDGPU_RING_TYPE_VCN_ENC
	.comm	_AMDGPU_RING_TYPE_VCN_JPEG,8,3  ; @AMDGPU_RING_TYPE_VCN_JPEG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ib test on %s succeeded\n"

l_.str.1:                               ; @.str.1
	.asciz	"IB test failed on %s (%d).\n"

.subsections_via_symbols
