	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __i915_sw_fence_complete
___i915_sw_fence_complete:              ## @__i915_sw_fence_complete
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_debug_fence_assert
	movq	%rbx, %rdi
	callq	_atomic_dec_and_test
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_DEBUG_FENCE_IDLE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_DEBUG_FENCE_NOTIFY@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_debug_fence_set_state
	movq	_FENCE_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	___i915_sw_fence_notify
	movq	_NOTIFY_DONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_debug_fence_set_state
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	___i915_sw_fence_wake_up_all
	movq	%rbx, %rdi
	callq	_debug_fence_destroy
	movq	_FENCE_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___i915_sw_fence_notify         ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_FENCE_IDLE,4,2           ## @DEBUG_FENCE_IDLE
	.comm	_DEBUG_FENCE_NOTIFY,4,2         ## @DEBUG_FENCE_NOTIFY
	.comm	_FENCE_COMPLETE,4,2             ## @FENCE_COMPLETE
	.comm	_NOTIFY_DONE,8,3                ## @NOTIFY_DONE
	.comm	_FENCE_FREE,4,2                 ## @FENCE_FREE
	.no_dead_strip	___i915_sw_fence_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __i915_sw_fence_complete
___i915_sw_fence_complete:              ; @__i915_sw_fence_complete
	.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, x1
	mov	x19, x0
	bl	_debug_fence_assert
	mov	x0, x19
	bl	_atomic_dec_and_test
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x21, _DEBUG_FENCE_IDLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DEBUG_FENCE_IDLE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _DEBUG_FENCE_NOTIFY@GOTPAGE
Lloh3:
	ldr	x22, [x22, _DEBUG_FENCE_NOTIFY@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_debug_fence_set_state
Lloh4:
	adrp	x8, _FENCE_COMPLETE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FENCE_COMPLETE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	___i915_sw_fence_notify
Lloh7:
	adrp	x8, _NOTIFY_DONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NOTIFY_DONE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_debug_fence_set_state
	mov	x0, x19
	mov	x1, x20
	bl	___i915_sw_fence_wake_up_all
	mov	x0, x19
	bl	_debug_fence_destroy
Lloh10:
	adrp	x8, _FENCE_FREE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FENCE_FREE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	___i915_sw_fence_notify
LBB0_3:
	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 AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_FENCE_IDLE,4,2           ; @DEBUG_FENCE_IDLE
	.comm	_DEBUG_FENCE_NOTIFY,4,2         ; @DEBUG_FENCE_NOTIFY
	.comm	_FENCE_COMPLETE,4,2             ; @FENCE_COMPLETE
	.comm	_NOTIFY_DONE,8,3                ; @NOTIFY_DONE
	.comm	_FENCE_FREE,4,2                 ; @FENCE_FREE
	.no_dead_strip	___i915_sw_fence_complete
.subsections_via_symbols
