	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_ring_write
_amdgpu_ring_write:                     ## @amdgpu_ring_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	testq	%rax, %rax
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	(%rbx), %rax
LBB0_2:
	movq	24(%rbx), %rcx
	movslq	20(%rbx), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 20(%rbx)
	andq	8(%rbx), %rdx
	movl	%r14d, (%rcx,%rdx,4)
	movl	16(%rbx), %ecx
	andl	%ecx, 20(%rbx)
	decq	%rax
	movq	%rax, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"amdgpu: writing more dwords to the ring than expected!\n"

	.no_dead_strip	_amdgpu_ring_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_ring_write
_amdgpu_ring_write:                     ; @amdgpu_ring_write
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #0
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	ldr	x8, [x19]
LBB0_2:
	ldr	x9, [x19, #24]
	ldrsw	x10, [x19, #20]
	add	w11, w10, #1
	str	w11, [x19, #20]
	ldr	x11, [x19, #8]
	and	x10, x11, x10
	str	w20, [x9, x10, lsl #2]
	ldp	w9, w10, [x19, #16]
	and	w9, w10, w9
	str	w9, [x19, #20]
	sub	x8, x8, #1
	str	x8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"amdgpu: writing more dwords to the ring than expected!\n"

	.no_dead_strip	_amdgpu_ring_write
.subsections_via_symbols
