	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	4(%rsi), %r12d
	movq	_I915_GEM_GPU_DOMAINS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r12d, %eax
	jne	LBB0_1
## %bb.2:
	movq	%rsi, %r13
	movl	(%rsi), %r14d
	testl	%r14d, %eax
	jne	LBB0_1
## %bb.3:
	movq	%rdx, %r15
	testl	%r12d, %r12d
	sete	%al
	je	LBB0_5
## %bb.4:
	cmpl	%r12d, %r14d
	je	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movl	8(%r13), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %r13
	movq	%r15, %rsi
	callq	_drm_gem_object_lookup
	movl	%eax, %edi
	callq	_to_intel_bo
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	xorl	%esi, %esi
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movb	%al, %sil
	movq	%r15, %rdi
	callq	_i915_gem_object_wait_rendering__nonblocking
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	xorl	%esi, %esi
	testl	%r12d, %r12d
	setne	%sil
	movq	_I915_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_i915_gem_object_set_to_gtt_domain
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmovnel	%eax, %ebx
	jmp	LBB0_12
LBB0_7:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_11:
	movq	%r15, %rdi
	callq	_i915_gem_object_set_to_cpu_domain
	movl	%eax, %ebx
LBB0_12:
	movq	%r15, %rdi
	callq	_drm_gem_object_unreference
LBB0_13:
	movq	%r13, %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
	.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_GEM_DOMAIN_GTT,4,2        ## @I915_GEM_DOMAIN_GTT
.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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w24, [x1, #4]
Lloh0:
	adrp	x8, _I915_GEM_GPU_DOMAINS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_GEM_GPU_DOMAINS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w24
	b.ne	LBB0_8
; %bb.1:
	mov	x23, x1
	ldr	w25, [x1]
	tst	w8, w25
	b.ne	LBB0_8
; %bb.2:
	cmp	w24, #0
	cset	w22, eq
	ccmp	w25, w24, #4, ne
	b.ne	LBB0_8
; %bb.3:
	mov	x20, x2
	mov	x19, x0
	bl	_i915_mutex_lock_interruptible
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	w2, [x23, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_drm_gem_object_lookup
	bl	_to_intel_bo
	cbz	x0, LBB0_10
; %bb.5:
	mov	x20, x0
	mov	x1, x22
	bl	_i915_gem_object_wait_rendering__nonblocking
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.6:
	cmp	w24, #0
	cset	w1, ne
Lloh3:
	adrp	x8, _I915_GEM_DOMAIN_GTT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x0, x20
	tst	w8, w25
	b.eq	LBB0_11
; %bb.7:
	bl	_i915_gem_object_set_to_gtt_domain
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	csel	w21, wzr, w0, eq
	b	LBB0_12
LBB0_8:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_11:
	bl	_i915_gem_object_set_to_cpu_domain
	mov	x21, x0
LBB0_12:
	mov	x0, x20
	bl	_drm_gem_object_unreference
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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_GEM_DOMAIN_GTT,4,2        ; @I915_GEM_DOMAIN_GTT
.subsections_via_symbols
