	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_sync_resv               ## -- Begin function radeon_sync_resv
	.p2align	4, 0x90
_radeon_sync_resv:                      ## @radeon_sync_resv
	.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
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	%rdx, %rdi
	callq	_dma_resv_get_excl
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_to_radeon_fence
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpq	%r15, (%rax)
	je	LBB0_3
LBB0_4:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_dma_fence_wait
	movl	%eax, %r14d
	jmp	LBB0_5
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	callq	_radeon_sync_fence
LBB0_5:
	movq	%r12, %rdi
	callq	_dma_resv_get_list
	testl	%ebx, %ebx
	jne	LBB0_17
## %bb.6:
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_17
## %bb.7:
	testl	%r14d, %r14d
	jne	LBB0_17
## %bb.8:
	cmpl	$0, (%r13)
	je	LBB0_14
## %bb.9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_dma_fence_wait
	testl	%eax, %eax
	jne	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jae	LBB0_14
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %r14d
	movq	%r12, %rdi
	callq	_dma_resv_held
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_rcu_dereference_protected
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_to_radeon_fence
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r15, (%rax)
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	callq	_radeon_sync_fence
	jmp	LBB0_13
LBB0_14:
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_16:
	movl	%eax, %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_sync_resv               ; -- Begin function radeon_sync_resv
	.p2align	2
_radeon_sync_resv:                      ; @radeon_sync_resv
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x2
	bl	_dma_resv_get_excl
	cbz	x0, LBB0_5
; %bb.1:
	mov	x22, x0
	bl	_to_radeon_fence
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, x0
	ldr	x8, [x0]
	cmp	x8, x21
	b.eq	LBB0_4
LBB0_3:
	mov	x0, x22
	mov	w1, #1
	bl	_dma_fence_wait
	mov	x24, x0
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_radeon_sync_fence
LBB0_5:
	mov	w24, #0
LBB0_6:
	mov	x0, x19
	bl	_dma_resv_get_list
	cbnz	w23, LBB0_18
; %bb.7:
	mov	x22, x0
	cbz	x0, LBB0_18
; %bb.8:
	cbnz	w24, LBB0_18
; %bb.9:
	ldr	w8, [x22]
	cbz	w8, LBB0_16
; %bb.10:
	mov	x25, #0
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x23
	mov	w1, #1
	bl	_dma_fence_wait
	cbnz	w0, LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x25, x25, #1
	ldr	w8, [x22]
	cmp	x25, x8
	b.hs	LBB0_16
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w23, [x8, x25, lsl #2]
	mov	x0, x19
	bl	_dma_resv_held
	mov	x1, x0
	mov	x0, x23
	bl	_rcu_dereference_protected
	mov	x23, x0
	bl	_to_radeon_fence
	cbz	x0, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x1, x0
	ldr	x8, [x0]
	cmp	x8, x21
	b.ne	LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x20
	bl	_radeon_sync_fence
	b	LBB0_12
LBB0_16:
	mov	w24, #0
	b	LBB0_18
LBB0_17:
	mov	x24, x0
LBB0_18:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
