	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_clflush_object        ## -- Begin function i915_gem_clflush_object
	.p2align	4, 0x90
_i915_gem_clflush_object:               ## @i915_gem_clflush_object
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_assert_object_held
	movq	%rbx, %rdi
	callq	_i915_gem_object_has_struct_page
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_I915_CLFLUSH_FORCE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_3
LBB0_4:
	movq	%rbx, %rdi
	callq	_trace_i915_gem_object_clflush
	movq	_I915_CLFLUSH_SYNC@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_5
LBB0_7:
	cmpq	$0, 16(%rbx)
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	___do_clflush
	jmp	LBB0_10
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_3:
	movq	_I915_BO_CACHE_COHERENT_FOR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, 4(%rbx)
	jne	LBB0_12
	jmp	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	callq	_clflush_work_create
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %r15
	movq	%rax, %rdi
	addq	$4, %rdi
	movl	24(%rbx), %esi
	movq	_I915_FENCE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_I915_FENCE_GFP@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$1, %r14d
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_i915_sw_fence_await_reservation
	movl	24(%rbx), %edi
	movq	%r15, %rsi
	callq	_dma_resv_add_excl_fence
	movq	%r15, %rdi
	callq	_dma_fence_work_commit
	jmp	LBB0_11
LBB0_9:
	movq	8(%rbx), %rax
	movq	_I915_GEM_DOMAIN_CPU@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_GEM_BUG_ON
LBB0_10:
	movl	$1, %r14d
LBB0_11:
	movl	$0, (%rbx)
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_CLFLUSH_FORCE,4,2         ## @I915_CLFLUSH_FORCE
	.comm	_I915_BO_CACHE_COHERENT_FOR_READ,4,2 ## @I915_BO_CACHE_COHERENT_FOR_READ
	.comm	_I915_CLFLUSH_SYNC,4,2          ## @I915_CLFLUSH_SYNC
	.comm	_I915_FENCE_TIMEOUT,4,2         ## @I915_FENCE_TIMEOUT
	.comm	_I915_FENCE_GFP,4,2             ## @I915_FENCE_GFP
	.comm	_I915_GEM_DOMAIN_CPU,8,3        ## @I915_GEM_DOMAIN_CPU
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_clflush_object        ; -- Begin function i915_gem_clflush_object
	.p2align	2
_i915_gem_clflush_object:               ; @i915_gem_clflush_object
	.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	_assert_object_held
	mov	x0, x19
	bl	_i915_gem_object_has_struct_page
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _I915_CLFLUSH_FORCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_CLFLUSH_FORCE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_trace_i915_gem_object_clflush
Lloh3:
	adrp	x8, _I915_CLFLUSH_SYNC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_CLFLUSH_SYNC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
LBB0_3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.4:
	mov	x0, x19
	bl	___do_clflush
	b	LBB0_11
LBB0_5:
	mov	w20, #0
	b	LBB0_12
LBB0_6:
	ldr	w8, [x19, #4]
Lloh6:
	adrp	x9, _I915_BO_CACHE_COHERENT_FOR_READ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I915_BO_CACHE_COHERENT_FOR_READ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.7:
	mov	w20, #0
	b	LBB0_13
LBB0_8:
	mov	x0, x19
	bl	_clflush_work_create
	cbz	x0, LBB0_3
; %bb.9:
	mov	x21, x0
	add	x0, x0, #4
	ldr	w1, [x19, #24]
Lloh9:
	adrp	x8, _I915_FENCE_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I915_FENCE_TIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _I915_FENCE_GFP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I915_FENCE_GFP@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
	mov	w20, #1
	mov	x2, #0
	mov	w3, #1
	bl	_i915_sw_fence_await_reservation
	ldr	w0, [x19, #24]
	mov	x1, x21
	bl	_dma_resv_add_excl_fence
	mov	x0, x21
	bl	_dma_fence_work_commit
	b	LBB0_12
LBB0_10:
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _I915_GEM_DOMAIN_CPU@GOTPAGE
Lloh16:
	ldr	x9, [x9, _I915_GEM_DOMAIN_CPU@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_GEM_BUG_ON
LBB0_11:
	mov	w20, #1
LBB0_12:
	str	wzr, [x19]
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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_CLFLUSH_FORCE,4,2         ; @I915_CLFLUSH_FORCE
	.comm	_I915_BO_CACHE_COHERENT_FOR_READ,4,2 ; @I915_BO_CACHE_COHERENT_FOR_READ
	.comm	_I915_CLFLUSH_SYNC,4,2          ; @I915_CLFLUSH_SYNC
	.comm	_I915_FENCE_TIMEOUT,4,2         ; @I915_FENCE_TIMEOUT
	.comm	_I915_FENCE_GFP,4,2             ; @I915_FENCE_GFP
	.comm	_I915_GEM_DOMAIN_CPU,8,3        ; @I915_GEM_DOMAIN_CPU
.subsections_via_symbols
