	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvd_v2_2_semaphore_emit        ## -- Begin function uvd_v2_2_semaphore_emit
	.p2align	4, 0x90
_uvd_v2_2_semaphore_emit:               ## @uvd_v2_2_semaphore_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rsi, %r15
	movl	(%rdx), %ebx
	movq	_UVD_SEMA_ADDR_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET0
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movl	%ebx, %esi
	shrl	$3, %esi
	andl	$1048575, %esi                  ## imm = 0xFFFFF
	movq	%r15, %rdi
	callq	_radeon_ring_write
	movq	_UVD_SEMA_ADDR_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET0
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	sarl	$23, %ebx
	andl	$1048575, %ebx                  ## imm = 0xFFFFF
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_radeon_ring_write
	movq	_UVD_SEMA_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET0
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	xorl	%esi, %esi
	testl	%r14d, %r14d
	setne	%sil
	movq	%r15, %rdi
	callq	_radeon_ring_write
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UVD_SEMA_ADDR_LOW,4,2          ## @UVD_SEMA_ADDR_LOW
	.comm	_UVD_SEMA_ADDR_HIGH,4,2         ## @UVD_SEMA_ADDR_HIGH
	.comm	_UVD_SEMA_CMD,4,2               ## @UVD_SEMA_CMD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvd_v2_2_semaphore_emit        ; -- Begin function uvd_v2_2_semaphore_emit
	.p2align	2
_uvd_v2_2_semaphore_emit:               ; @uvd_v2_2_semaphore_emit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x20, x1
	ldr	w21, [x2]
Lloh0:
	adrp	x8, _UVD_SEMA_ADDR_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UVD_SEMA_ADDR_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET0
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	ubfx	w1, w21, #3, #20
	mov	x0, x20
	bl	_radeon_ring_write
Lloh3:
	adrp	x8, _UVD_SEMA_ADDR_HIGH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UVD_SEMA_ADDR_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET0
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	asr	w8, w21, #23
	and	w1, w8, #0xfffff
	mov	x0, x20
	bl	_radeon_ring_write
Lloh6:
	adrp	x8, _UVD_SEMA_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UVD_SEMA_CMD@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET0
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	cmp	w19, #0
	cset	w1, ne
	mov	x0, x20
	bl	_radeon_ring_write
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_UVD_SEMA_ADDR_LOW,4,2          ; @UVD_SEMA_ADDR_LOW
	.comm	_UVD_SEMA_ADDR_HIGH,4,2         ; @UVD_SEMA_ADDR_HIGH
	.comm	_UVD_SEMA_CMD,4,2               ; @UVD_SEMA_CMD
.subsections_via_symbols
