	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cik_sdma_semaphore_ring_emit   ## -- Begin function cik_sdma_semaphore_ring_emit
	.p2align	4, 0x90
_cik_sdma_semaphore_ring_emit:          ## @cik_sdma_semaphore_ring_emit
	.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
	movq	%rsi, %rbx
	movl	(%rdx), %r14d
	movl	$0, %edx
	testl	%ecx, %ecx
	jne	LBB0_2
## %bb.1:
	movq	_SDMA_SEMAPHORE_EXTRA_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_2:
	movq	_SDMA_OPCODE_SEMAPHORE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_SDMA_PACKET
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movl	%r14d, %esi
	andl	$-8, %esi
	movq	%rbx, %rdi
	callq	_radeon_ring_write
	movl	%r14d, %edi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_SEMAPHORE_EXTRA_S,4,2     ## @SDMA_SEMAPHORE_EXTRA_S
	.comm	_SDMA_OPCODE_SEMAPHORE,4,2      ## @SDMA_OPCODE_SEMAPHORE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cik_sdma_semaphore_ring_emit   ; -- Begin function cik_sdma_semaphore_ring_emit
	.p2align	2
_cik_sdma_semaphore_ring_emit:          ; @cik_sdma_semaphore_ring_emit
	.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	x19, x1
	ldr	w20, [x2]
Lloh0:
	adrp	x8, _SDMA_SEMAPHORE_EXTRA_S@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_SEMAPHORE_EXTRA_S@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w3, #0
	csel	w2, w8, wzr, eq
Lloh3:
	adrp	x8, _SDMA_OPCODE_SEMAPHORE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDMA_OPCODE_SEMAPHORE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_SDMA_PACKET
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
	and	w1, w20, #0xfffffff8
	mov	x0, x19
	bl	_radeon_ring_write
	mov	x0, x20
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_SEMAPHORE_EXTRA_S,4,2     ; @SDMA_SEMAPHORE_EXTRA_S
	.comm	_SDMA_OPCODE_SEMAPHORE,4,2      ; @SDMA_OPCODE_SEMAPHORE
.subsections_via_symbols
