	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v9_0_wait_reg_mem
_gfx_v9_0_wait_reg_mem:                 ## @gfx_v9_0_wait_reg_mem
	.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
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	32(%rbp), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	24(%rbp), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_PACKET3_WAIT_REG_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$5, %esi
	callq	_PACKET3
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	movl	%r15d, %edi
	callq	_WAIT_REG_MEM_MEM_SPACE
	movl	%eax, %r14d
	movl	%r13d, %edi
	callq	_WAIT_REG_MEM_OPERATION
	orl	%eax, %r14d
	movl	$3, %edi
	callq	_WAIT_REG_MEM_FUNCTION
	orl	%eax, %r14d
	movl	%r12d, %edi
	callq	_WAIT_REG_MEM_ENGINE
	orl	%eax, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	callq	_amdgpu_ring_write
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movl	%r14d, %edi
	andl	$3, %edi
	callq	_BUG_ON
LBB0_2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_amdgpu_ring_write
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_amdgpu_ring_write
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_amdgpu_ring_write
	movq	%rbx, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_amdgpu_ring_write
	movq	%rbx, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amdgpu_ring_write              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET3_WAIT_REG_MEM,4,2       ## @PACKET3_WAIT_REG_MEM
	.no_dead_strip	_gfx_v9_0_wait_reg_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v9_0_wait_reg_mem
_gfx_v9_0_wait_reg_mem:                 ; @gfx_v9_0_wait_reg_mem
	.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, x7
	mov	x22, x6
	mov	x23, x5
	mov	x24, x4
	mov	x25, x3
	mov	x26, x2
	mov	x27, x1
	mov	x20, x0
	ldr	w21, [x29, #16]
Lloh0:
	adrp	x8, _PACKET3_WAIT_REG_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PACKET3_WAIT_REG_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #5
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x20
	bl	_amdgpu_ring_write
	mov	x0, x26
	bl	_WAIT_REG_MEM_MEM_SPACE
	mov	x28, x0
	mov	x0, x25
	bl	_WAIT_REG_MEM_OPERATION
	orr	w25, w0, w28
	mov	w0, #3
	bl	_WAIT_REG_MEM_FUNCTION
	orr	w25, w25, w0
	mov	x0, x27
	bl	_WAIT_REG_MEM_ENGINE
	orr	w1, w25, w0
	mov	x0, x20
	bl	_amdgpu_ring_write
	cbz	w26, LBB0_2
; %bb.1:
	and	w0, w24, #0x3
	bl	_BUG_ON
LBB0_2:
	mov	x0, x20
	mov	x1, x24
	bl	_amdgpu_ring_write
	mov	x0, x20
	mov	x1, x23
	bl	_amdgpu_ring_write
	mov	x0, x20
	mov	x1, x22
	bl	_amdgpu_ring_write
	mov	x0, x20
	mov	x1, x19
	bl	_amdgpu_ring_write
	mov	x0, x20
	mov	x1, x21
	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
	b	_amdgpu_ring_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET3_WAIT_REG_MEM,4,2       ; @PACKET3_WAIT_REG_MEM
	.no_dead_strip	_gfx_v9_0_wait_reg_mem
.subsections_via_symbols
