	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __i915_sw_fence_await_sw_fence
___i915_sw_fence_await_sw_fence:        ## @__i915_sw_fence_await_sw_fence
	.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, %r12d
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_debug_fence_assert
	movl	%r12d, %edi
	callq	_gfpflags_allow_blocking
	movl	%eax, %edi
	callq	_might_sleep_if
	movq	%r15, %rdi
	callq	_i915_sw_fence_done
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_i915_sw_fence_set_error_once
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_2:
	movq	%r15, %rdi
	callq	_debug_fence_assert
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_i915_sw_fence_check_if_after
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_5:
	xorl	%r13d, %r13d
	testq	%r14, %r14
	jne	LBB0_11
## %bb.6:
	movl	$32, %edi
	movl	%r12d, %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movq	%rax, %r14
	movq	_I915_SW_FENCE_FLAG_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_11:
	leaq	24(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movl	%r13d, (%r14)
	movq	_i915_sw_fence_wake@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r14)
	movq	%rbx, 8(%r14)
	movq	%rbx, %rdi
	callq	_i915_sw_fence_await
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_i915_sw_fence_done
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	___add_wait_queue_entry_tail
	movl	$1, %ebx
	jmp	LBB0_14
LBB0_13:
	movl	4(%r15), %edx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_i915_sw_fence_wake
LBB0_14:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%r12d, %edi
	callq	_gfpflags_allow_blocking
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r15, %rdi
	callq	_i915_sw_fence_wait
	jmp	LBB0_1
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_I915_SW_FENCE_FLAG_ALLOC,4,2   ## @I915_SW_FENCE_FLAG_ALLOC
	.no_dead_strip	___i915_sw_fence_await_sw_fence
.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_await_sw_fence
___i915_sw_fence_await_sw_fence:        ; @__i915_sw_fence_await_sw_fence
	.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	x22, x3
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_debug_fence_assert
	mov	x0, x22
	bl	_gfpflags_allow_blocking
	bl	_might_sleep_if
	mov	x0, x19
	bl	_i915_sw_fence_done
	cbz	x0, LBB0_2
LBB0_1:
	ldr	w1, [x19, #4]
	mov	x0, x21
	bl	_i915_sw_fence_set_error_once
	mov	w20, #0
	b	LBB0_13
LBB0_2:
	mov	x0, x19
	bl	_debug_fence_assert
	mov	x0, x21
	mov	x1, x19
	bl	_i915_sw_fence_check_if_after
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_5:
	cbz	x20, LBB0_7
; %bb.6:
	mov	w22, #0
	b	LBB0_9
LBB0_7:
	mov	w0, #32
	mov	x1, x22
	bl	_kmalloc
	cbz	x0, LBB0_14
; %bb.8:
	mov	x20, x0
Lloh2:
	adrp	x8, _I915_SW_FENCE_FLAG_ALLOC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I915_SW_FENCE_FLAG_ALLOC@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
LBB0_9:
	add	x0, x20, #24
	bl	_INIT_LIST_HEAD
	str	w22, [x20]
Lloh5:
	adrp	x8, _i915_sw_fence_wake@GOTPAGE
Lloh6:
	ldr	x8, [x8, _i915_sw_fence_wake@GOTPAGEOFF]
	stp	x21, x8, [x20, #8]
	mov	x0, x21
	bl	_i915_sw_fence_await
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_i915_sw_fence_done
	cmp	x0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	bl	___add_wait_queue_entry_tail
	mov	w20, #1
	b	LBB0_12
LBB0_11:
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	w1, #0
	mov	x3, #0
	bl	_i915_sw_fence_wake
	mov	w20, #0
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_13:
	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
LBB0_14:
	mov	x0, x22
	bl	_gfpflags_allow_blocking
	cbz	w0, LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_i915_sw_fence_wait
	b	LBB0_1
LBB0_16:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_I915_SW_FENCE_FLAG_ALLOC,4,2   ; @I915_SW_FENCE_FLAG_ALLOC
	.no_dead_strip	___i915_sw_fence_await_sw_fence
.subsections_via_symbols
