	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_fence_chain_walk           ## -- Begin function dma_fence_chain_walk
	.p2align	4, 0x90
_dma_fence_chain_walk:                  ## @dma_fence_chain_walk
	.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_dma_fence_chain
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_dma_fence_chain_get_prev
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	%rax, %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	callq	_dma_fence_put
	movq	%r13, %rdi
	callq	_dma_fence_put
	movq	%r15, %rdi
	callq	_dma_fence_chain_get_prev
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_to_dma_fence_chain
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movq	8(%rax), %rdi
	callq	_dma_fence_is_signaled
	testl	%eax, %eax
	je	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_dma_fence_chain_get_prev
	movq	%rax, %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_dma_fence_is_signaled
	testl	%eax, %eax
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_cmpxchg
	cmpq	%r13, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	jmp	LBB0_11
LBB0_12:
	xorl	%r13d, %r13d
LBB0_13:
	movq	%r14, %rdi
	callq	_dma_fence_put
	movq	%r13, %rax
	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	_dma_fence_chain_walk           ; -- Begin function dma_fence_chain_walk
	.p2align	2
_dma_fence_chain_walk:                  ; @dma_fence_chain_walk
	.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, x0
	bl	_to_dma_fence_chain
	cbz	x0, LBB0_12
; %bb.1:
	mov	x21, x0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_dma_fence_put
	mov	x0, x20
	bl	_dma_fence_put
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_dma_fence_chain_get_prev
	mov	x20, x0
	cbz	x0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_to_dma_fence_chain
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	ldr	x0, [x0, #8]
	bl	_dma_fence_is_signaled
	cbz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_dma_fence_chain_get_prev
	mov	x22, x0
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_dma_fence_is_signaled
	cbz	w0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, #0
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_cmpxchg
	cmp	x0, x20
	b.ne	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	b	LBB0_3
LBB0_12:
	mov	x20, #0
LBB0_13:
	mov	x0, x19
	bl	_dma_fence_put
	mov	x0, x20
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
