	.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, %rbx
	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), %r12d
	leaq	(,%r12,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	testq	%r12, %r12
	je	LBB0_13
## %bb.1:
	cmpl	$1, %r12d
	jne	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
LBB0_9:
	testb	$1, %r12b
	je	LBB0_12
## %bb.10:
	movq	$0, (%rsi,%rcx,8)
	movq	(%rbx,%rcx,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:
	movq	(%rdx), %rdx
	movq	%rdx, (%rsi,%rcx,8)
	incl	%eax
LBB0_12:
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_radeon_fence_wait_seq_timeout
	movq	%rax, %rcx
	sarq	$63, %rax
	andl	%ecx, %eax
	jmp	LBB0_15
LBB0_13:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
                                        ## kill: def $eax killed $eax killed $rax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r12d, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rsi,%rcx,8)
	movq	(%rbx,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rdi), %rdi
	movq	%rdi, (%rsi,%rcx,8)
	incl	%eax
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, 8(%rsi,%rcx,8)
	movq	8(%rbx,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rdi), %rdi
	movq	%rdi, 8(%rsi,%rcx,8)
	incl	%eax
	jmp	LBB0_8
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ## @RADEON_NUM_RINGS
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
.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	w13, [x8]
	lsl	x12, x13, #3
	mov	x9, x12
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x12, #15
	and	x9, x9, #0xffffffff0
	sub	x8, x8, x9
	mov	sp, x8
	cbz	w13, LBB0_7
; %bb.1:
	mov	x10, #0
	mov	w9, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #8
	cmp	x12, x10
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x8, x10]
	ldr	x11, [x1, x10]
	cbz	x11, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x11]
	str	x11, [x8, x10]
	add	w9, w9, #1
	b	LBB0_2
LBB0_5:
	cbz	w9, LBB0_7
; %bb.6:
Lloh8:
	adrp	x9, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x9]
	mov	x1, x8
	bl	_radeon_fence_wait_seq_timeout
	cmp	x0, #0
	csel	x0, x0, xzr, lt
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldur	x8, [x29, #-8]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ; @RADEON_NUM_RINGS
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
.subsections_via_symbols
