	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_domain_ioctl      ## -- Begin function i915_gem_set_domain_ioctl
	.p2align	4, 0x90
_i915_gem_set_domain_ioctl:             ## @i915_gem_set_domain_ioctl
	.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	(%rsi), %r12d
	movl	4(%rsi), %r15d
	movl	%r15d, %eax
	orl	%r12d, %eax
	movq	_I915_GEM_GPU_DOMAINS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.3:
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	cmpl	%r15d, %r12d
	je	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.7:
	movl	8(%rsi), %esi
	movq	%rdx, %rdi
	callq	_i915_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r14
	movl	4(%rax), %edi
	callq	_READ_ONCE
	xorl	%ebx, %ebx
	cmpl	%r12d, %eax
	je	LBB0_25
## %bb.10:
	movq	_I915_WAIT_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movq	_I915_WAIT_PRIORITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	%r15d, %eax
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.11:
	movq	_I915_WAIT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	orl	%eax, %esi
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_i915_gem_object_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.13:
	movq	%r14, %rdi
	callq	_i915_gem_object_is_proxy
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_8:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_15:
	movq	%r14, %rdi
	callq	_i915_gem_object_pin_pages
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.16:
	movq	%r14, %rdi
	callq	_i915_gem_object_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.17:
	movq	_I915_GEM_DOMAIN_WC@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_i915_gem_object_set_to_wc_domain
	jmp	LBB0_22
LBB0_19:
	movq	_I915_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_i915_gem_object_set_to_gtt_domain
	jmp	LBB0_22
LBB0_21:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_i915_gem_object_set_to_cpu_domain
LBB0_22:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_i915_gem_object_bump_inactive_ggtt
	movq	%r14, %rdi
	callq	_i915_gem_object_unlock
	testl	%r15d, %r15d
	je	LBB0_24
## %bb.23:
	movl	(%r14), %edi
	movq	_ORIGIN_CPU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_intel_frontbuffer_invalidate
LBB0_24:
	movq	%r14, %rdi
	callq	_i915_gem_object_unpin_pages
LBB0_25:
	movq	%r14, %rdi
	callq	_i915_gem_object_put
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_GEM_GPU_DOMAINS,4,2       ## @I915_GEM_GPU_DOMAINS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ## @I915_WAIT_INTERRUPTIBLE
	.comm	_I915_WAIT_PRIORITY,4,2         ## @I915_WAIT_PRIORITY
	.comm	_I915_WAIT_ALL,4,2              ## @I915_WAIT_ALL
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_I915_GEM_DOMAIN_WC,4,2         ## @I915_GEM_DOMAIN_WC
	.comm	_I915_GEM_DOMAIN_GTT,4,2        ## @I915_GEM_DOMAIN_GTT
	.comm	_ORIGIN_CPU,4,2                 ## @ORIGIN_CPU
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_domain_ioctl      ; -- Begin function i915_gem_set_domain_ioctl
	.p2align	2
_i915_gem_set_domain_ioctl:             ; @i915_gem_set_domain_ioctl
	.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
	ldp	w22, w20, [x1]
	orr	w8, w20, w22
Lloh0:
	adrp	x9, _I915_GEM_GPU_DOMAINS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I915_GEM_GPU_DOMAINS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w8, w9
	b.ne	LBB0_6
; %bb.1:
	cmp	w20, #0
	ccmp	w22, w20, #4, ne
	b.ne	LBB0_6
; %bb.2:
	cbz	w22, LBB0_9
; %bb.3:
	ldr	w1, [x1, #8]
	mov	x0, x2
	bl	_i915_gem_object_lookup
	cbz	x0, LBB0_10
; %bb.4:
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_READ_ONCE
	cmp	w0, w22
	b.ne	LBB0_11
; %bb.5:
	mov	w21, #0
	b	LBB0_24
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	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
LBB0_9:
	mov	w21, #0
	b	LBB0_8
LBB0_10:
Lloh5:
	adrp	x8, _ENOENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_7
LBB0_11:
Lloh7:
	adrp	x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGEOFF]
Lloh9:
	adrp	x9, _I915_WAIT_PRIORITY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I915_WAIT_PRIORITY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _I915_WAIT_ALL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _I915_WAIT_ALL@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w1, w8, w9
Lloh16:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i915_gem_object_wait
	mov	x21, x0
	cbnz	w0, LBB0_24
; %bb.12:
	mov	x0, x19
	bl	_i915_gem_object_is_proxy
	cbz	x0, LBB0_14
; %bb.13:
Lloh19:
	adrp	x8, _ENXIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_24
LBB0_14:
	mov	x0, x19
	bl	_i915_gem_object_pin_pages
	mov	x21, x0
	cbnz	w0, LBB0_24
; %bb.15:
	mov	x0, x19
	bl	_i915_gem_object_lock_interruptible
	mov	x21, x0
	cbnz	w0, LBB0_23
; %bb.16:
Lloh22:
	adrp	x8, _I915_GEM_DOMAIN_WC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _I915_GEM_DOMAIN_WC@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_18
; %bb.17:
	mov	x0, x19
	mov	x1, x20
	bl	_i915_gem_object_set_to_wc_domain
	b	LBB0_21
LBB0_18:
Lloh25:
	adrp	x8, _I915_GEM_DOMAIN_GTT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _I915_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	mov	x0, x19
	mov	x1, x20
	tst	w8, w22
	b.eq	LBB0_20
; %bb.19:
	bl	_i915_gem_object_set_to_gtt_domain
	b	LBB0_21
LBB0_20:
	bl	_i915_gem_object_set_to_cpu_domain
LBB0_21:
	mov	x21, x0
	mov	x0, x19
	bl	_i915_gem_object_bump_inactive_ggtt
	mov	x0, x19
	bl	_i915_gem_object_unlock
	cbz	w20, LBB0_23
; %bb.22:
	ldr	w0, [x19]
Lloh28:
	adrp	x8, _ORIGIN_CPU@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ORIGIN_CPU@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_intel_frontbuffer_invalidate
LBB0_23:
	mov	x0, x19
	bl	_i915_gem_object_unpin_pages
LBB0_24:
	mov	x0, x19
	bl	_i915_gem_object_put
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_GEM_GPU_DOMAINS,4,2       ; @I915_GEM_GPU_DOMAINS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ; @I915_WAIT_INTERRUPTIBLE
	.comm	_I915_WAIT_PRIORITY,4,2         ; @I915_WAIT_PRIORITY
	.comm	_I915_WAIT_ALL,4,2              ; @I915_WAIT_ALL
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_I915_GEM_DOMAIN_WC,4,2         ; @I915_GEM_DOMAIN_WC
	.comm	_I915_GEM_DOMAIN_GTT,4,2        ; @I915_GEM_DOMAIN_GTT
	.comm	_ORIGIN_CPU,4,2                 ; @ORIGIN_CPU
.subsections_via_symbols
