	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_fence_wait_any          ## -- Begin function radeon_fence_wait_any
	.p2align	4, 0x90
_radeon_fence_wait_any:                 ## @radeon_fence_wait_any
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_RADEON_NUM_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	(,%rbx,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	_RADEON_FENCE_SIGNALED_SEQ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%rcx, %rbx
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rsi,%rcx,8)
	movq	(%r12,%rcx,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdx), %rdx
	cmpq	%rax, %rdx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, (%rsi,%rcx,8)
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_radeon_fence_wait_any_seq
	jmp	LBB0_8
LBB0_4:
	xorl	%eax, %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ## @RADEON_NUM_RINGS
	.comm	_RADEON_FENCE_SIGNALED_SEQ,8,3  ## @RADEON_FENCE_SIGNALED_SEQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_fence_wait_any          ; -- Begin function radeon_fence_wait_any
	.p2align	2
_radeon_fence_wait_any:                 ; @radeon_fence_wait_any
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
Lloh3:
	adrp	x8, _RADEON_NUM_RINGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RADEON_NUM_RINGS@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x8, x9, x8
	mov	sp, x8
	cbz	w12, LBB0_6
; %bb.1:
Lloh8:
	adrp	x9, _RADEON_FENCE_SIGNALED_SEQ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RADEON_FENCE_SIGNALED_SEQ@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	mov	x10, x8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #8
	add	x1, x1, #8
	subs	x12, x12, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x10]
	ldr	x11, [x1]
	cbz	x11, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x11]
	cmp	x11, x9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x11, [x10]
	b	LBB0_2
LBB0_6:
	mov	x1, x8
	bl	_radeon_fence_wait_any_seq
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldur	x8, [x29, #-8]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	sp, x29
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ; @RADEON_NUM_RINGS
	.comm	_RADEON_FENCE_SIGNALED_SEQ,8,3  ; @RADEON_FENCE_SIGNALED_SEQ
.subsections_via_symbols
