	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_object_set_to_cpu_domain ## -- Begin function i915_gem_object_set_to_cpu_domain
	.p2align	4, 0x90
_i915_gem_object_set_to_cpu_domain:     ## @i915_gem_object_set_to_cpu_domain
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_assert_object_held
	movq	_I915_WAIT_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	%r14d, %esi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	_I915_WAIT_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_2:
	orl	(%rax), %esi
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i915_gem_object_wait
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_I915_GEM_DOMAIN_CPU@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	notl	%esi
	movq	%rbx, %rdi
	callq	_i915_gem_object_flush_write_domain
	movl	(%r12), %edi
	testl	%edi, (%rbx)
	jne	LBB0_5
## %bb.4:
	movq	_I915_CLFLUSH_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i915_gem_clflush_object
	movl	(%r12), %eax
	orl	%eax, (%rbx)
	movl	(%r12), %edi
LBB0_5:
	notl	%edi
	andl	4(%rbx), %edi
	callq	_GEM_BUG_ON
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	___start_cpu_write
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ## @I915_WAIT_INTERRUPTIBLE
	.comm	_I915_WAIT_ALL,4,2              ## @I915_WAIT_ALL
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
	.comm	_I915_GEM_DOMAIN_CPU,4,2        ## @I915_GEM_DOMAIN_CPU
	.comm	_I915_CLFLUSH_SYNC,4,2          ## @I915_CLFLUSH_SYNC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_object_set_to_cpu_domain ; -- Begin function i915_gem_object_set_to_cpu_domain
	.p2align	2
_i915_gem_object_set_to_cpu_domain:     ; @i915_gem_object_set_to_cpu_domain
	.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
Lloh0:
	adrp	x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I915_WAIT_ALL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I915_WAIT_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w1, w9, w8
Lloh6:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i915_gem_object_wait
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.1:
Lloh9:
	adrp	x22, _I915_GEM_DOMAIN_CPU@GOTPAGE
Lloh10:
	ldr	x22, [x22, _I915_GEM_DOMAIN_CPU@GOTPAGEOFF]
	ldr	w8, [x22]
	mvn	w1, w8
	mov	x0, x19
	bl	_i915_gem_object_flush_write_domain
	ldr	w9, [x19]
	ldr	w8, [x22]
	tst	w8, w9
	b.ne	LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _I915_CLFLUSH_SYNC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I915_CLFLUSH_SYNC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i915_gem_clflush_object
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w8, [x22]
LBB0_3:
	ldr	w9, [x19, #4]
	bic	w0, w9, w8
	bl	_GEM_BUG_ON
	cbz	w20, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	___start_cpu_write
LBB0_5:
	mov	x0, x21
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ; @I915_WAIT_INTERRUPTIBLE
	.comm	_I915_WAIT_ALL,4,2              ; @I915_WAIT_ALL
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
	.comm	_I915_GEM_DOMAIN_CPU,4,2        ; @I915_GEM_DOMAIN_CPU
	.comm	_I915_CLFLUSH_SYNC,4,2          ; @I915_CLFLUSH_SYNC
.subsections_via_symbols
