	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_ring_write_multiple
_amdgpu_ring_write_multiple:            ## @amdgpu_ring_write_multiple
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%edi, %edi
	cmpl	%edx, (%r12)
	setl	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movl	8(%r12), %ebx
	movl	4(%r12), %edi
	andl	%ebx, %edi
	subl	%edi, %ebx
	incl	%ebx
	cmpl	%r14d, %ebx
	cmovael	%r14d, %ebx
	movl	%r14d, %r13d
	subl	%ebx, %r13d
	shll	$2, %ebx
	shll	$2, %r13d
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:
	shlq	$2, %rdi
	addq	16(%r12), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memcpy
LBB0_4:
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	addq	%rax, %r15
	movq	16(%r12), %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_memcpy
LBB0_6:
	movl	4(%r12), %eax
	addl	%r14d, %eax
	andl	12(%r12), %eax
	movl	%eax, 4(%r12)
	subl	%r14d, (%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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_multiple
.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_multiple
_amdgpu_ring_write_multiple:            ; @amdgpu_ring_write_multiple
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, w2
	cset	w0, lt
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	ldp	w8, w9, [x20, #4]
	and	w8, w9, w8
	sub	w9, w9, w8
	add	w10, w9, #1
	cmp	w10, w19
	csinc	w9, w19, w9, hs
	sub	w10, w19, w9
	lsl	w23, w9, #2
	lsl	w22, w10, #2
	cbz	w23, LBB0_4
; %bb.3:
	ldr	x9, [x20, #16]
	add	x0, x9, x8, lsl #2
	mov	x1, x21
	mov	x2, x23
	bl	_memcpy
LBB0_4:
	cbz	w22, LBB0_6
; %bb.5:
	add	x1, x21, w23, uxtw
	ldr	x0, [x20, #16]
	mov	x2, x22
	bl	_memcpy
LBB0_6:
	ldr	w8, [x20, #12]
	ldp	w10, w9, [x20]
	add	w9, w9, w19
	and	w8, w8, w9
	sub	w9, w10, w19
	stp	w9, w8, [x20]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 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_multiple
.subsections_via_symbols
