	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_fence_enable_signaling
_radeon_fence_enable_signaling:         ## @radeon_fence_enable_signaling
	.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
	movq	%rdi, %r14
	callq	_to_radeon_fence
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	48(%rbx), %r15
	movq	8(%r15), %rcx
	leaq	(%rcx,%rax,8), %rdi
	addq	$4, %rdi
	callq	_atomic64_read
	xorl	%r12d, %r12d
	cmpq	8(%rbx), %rax
	jge	LBB0_12
## %bb.1:
	leaq	16(%r15), %r13
	movq	%r13, %rdi
	callq	_down_read_trylock
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	callq	_radeon_irq_kms_sw_irq_get
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	callq	_radeon_fence_activity
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_wake_up_all_locked
LBB0_4:
	movq	8(%r15), %rax
	movq	(%rbx), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$4, %rdi
	callq	_atomic64_read
	cmpq	8(%rbx), %rax
	jge	LBB0_5
## %bb.6:
	movq	%r13, %rdi
	callq	_up_read
	jmp	LBB0_11
LBB0_7:
	callq	_radeon_irq_kms_sw_irq_get_delayed
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	8(%r15), %rax
	movq	(%rbx), %rsi
	movl	$1, (%rax,%rsi,8)
	jmp	LBB0_10
LBB0_5:
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	callq	_radeon_irq_kms_sw_irq_put
	movq	%r13, %rdi
	callq	_up_read
	jmp	LBB0_12
LBB0_8:
	movq	(%rbx), %rsi
LBB0_10:
	movq	%r15, %rdi
	callq	_radeon_fence_schedule_check
LBB0_11:
	leaq	24(%rbx), %rsi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	_radeon_fence_check_signaled@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r15, %rdi
	callq	___add_wait_queue
	movq	%r14, %rdi
	callq	_dma_fence_get
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_DMA_FENCE_TRACE
	movl	$1, %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_radeon_fence_check_signaled,4,2 ## @radeon_fence_check_signaled
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"armed on ring %i!\n"

	.no_dead_strip	_radeon_fence_enable_signaling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_fence_enable_signaling
_radeon_fence_enable_signaling:         ; @radeon_fence_enable_signaling
	.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	x20, x0
	bl	_to_radeon_fence
	mov	x19, x0
	ldr	x21, [x0, #48]
	ldr	x8, [x21, #8]
	ldr	x9, [x0]
	add	x8, x8, x9, lsl #3
	add	x0, x8, #4
	bl	_atomic64_read
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.ge	LBB0_6
; %bb.1:
	add	x22, x21, #16
	mov	x0, x22
	bl	_down_read_trylock
	ldr	x1, [x19]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x21
	bl	_radeon_irq_kms_sw_irq_get
	ldr	x1, [x19]
	mov	x0, x21
	bl	_radeon_fence_activity
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_wake_up_all_locked
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	x9, [x19]
	add	x8, x8, x9, lsl #3
	add	x0, x8, #4
	bl	_atomic64_read
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.ge	LBB0_9
; %bb.5:
	mov	x0, x22
	bl	_up_read
	b	LBB0_12
LBB0_6:
	mov	w0, #0
	b	LBB0_13
LBB0_7:
	mov	x0, x21
	bl	_radeon_irq_kms_sw_irq_get_delayed
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x8, [x21, #8]
	ldr	x1, [x19]
	lsl	x9, x1, #3
	mov	w10, #1
	str	w10, [x8, x9]
	b	LBB0_11
LBB0_9:
	ldr	x1, [x19]
	mov	x0, x21
	bl	_radeon_irq_kms_sw_irq_put
	mov	x0, x22
	bl	_up_read
	mov	w0, #0
	b	LBB0_13
LBB0_10:
	ldr	x1, [x19]
LBB0_11:
	mov	x0, x21
	bl	_radeon_fence_schedule_check
LBB0_12:
	stp	xzr, xzr, [x19, #32]
Lloh0:
	adrp	x8, _radeon_fence_check_signaled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _radeon_fence_check_signaled@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x1, x19
	str	w8, [x1, #24]!
	mov	x0, x21
	bl	___add_wait_queue
	mov	x0, x20
	bl	_dma_fence_get
	add	x0, x19, #16
	ldr	x2, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DMA_FENCE_TRACE
	mov	w0, #1
LBB0_13:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_radeon_fence_check_signaled,4,2 ; @radeon_fence_check_signaled
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"armed on ring %i!\n"

	.no_dead_strip	_radeon_fence_enable_signaling
.subsections_via_symbols
