	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_caching_ioctl     ## -- Begin function i915_gem_set_caching_ioctl
	.p2align	4, 0x90
_i915_gem_set_caching_ioctl:            ## @i915_gem_set_caching_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
	movq	%rdx, %r12
	movq	%rsi, %rbx
	callq	_to_i915
	movq	%rax, %r14
	movl	(%rbx), %eax
	cmpl	$130, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$128, %eax
	je	LBB0_3
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_4:
	movq	%r14, %rdi
	callq	_HAS_LLC
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_HAS_SNOOP
	testl	%eax, %eax
	je	LBB0_24
LBB0_6:
	movq	_I915_CACHE_LLC@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	%r14, %rdi
	callq	_HAS_WT
	testl	%eax, %eax
	jne	LBB0_10
LBB0_3:
	movq	_I915_CACHE_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_I915_CACHE_WT@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %r15d
	movl	4(%rbx), %esi
	movq	%r12, %rdi
	callq	_i915_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_i915_gem_object_is_proxy
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_14:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_16:
	xorl	%ebx, %ebx
	cmpl	%r15d, (%r12)
	je	LBB0_22
## %bb.17:
	movq	_I915_WAIT_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_i915_gem_object_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.18:
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.19:
	movq	%r12, %rdi
	callq	_i915_gem_object_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_i915_gem_object_set_cache_level
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_i915_gem_object_unlock
LBB0_21:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_22:
	movq	%r12, %rdi
	callq	_i915_gem_object_put
LBB0_23:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_CACHE_NONE,4,2            ## @I915_CACHE_NONE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_I915_CACHE_LLC,4,2             ## @I915_CACHE_LLC
	.comm	_I915_CACHE_WT,4,2              ## @I915_CACHE_WT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ## @I915_WAIT_INTERRUPTIBLE
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_caching_ioctl     ; -- Begin function i915_gem_set_caching_ioctl
	.p2align	2
_i915_gem_set_caching_ioctl:            ; @i915_gem_set_caching_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
	mov	x20, x2
	mov	x22, x1
	bl	_to_i915
	mov	x19, x0
	ldr	w8, [x22]
	cmp	w8, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.3:
Lloh0:
	adrp	x8, _I915_CACHE_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_CACHE_NONE@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	mov	x0, x19
	bl	_HAS_LLC
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_HAS_SNOOP
	cbz	w0, LBB0_23
LBB0_6:
Lloh2:
	adrp	x8, _I915_CACHE_LLC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I915_CACHE_LLC@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_HAS_WT
Lloh4:
	adrp	x8, _I915_CACHE_WT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _I915_CACHE_WT@GOTPAGEOFF]
Lloh6:
	adrp	x9, _I915_CACHE_NONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I915_CACHE_NONE@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x9, x8, eq
LBB0_8:
	ldr	w21, [x8]
	ldr	w1, [x22, #4]
	mov	x0, x20
	bl	_i915_gem_object_lookup
	cbz	x0, LBB0_11
; %bb.9:
	mov	x20, x0
	bl	_i915_gem_object_is_proxy
	cbz	x0, LBB0_14
; %bb.10:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_21
LBB0_11:
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_22
LBB0_14:
	ldr	w8, [x20]
	cmp	w8, w21
	b.ne	LBB0_16
; %bb.15:
	mov	w22, #0
	b	LBB0_21
LBB0_16:
Lloh15:
	adrp	x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_i915_gem_object_wait
	mov	x22, x0
	cbnz	w0, LBB0_21
; %bb.17:
	mov	x0, x19
	bl	_mutex_lock_interruptible
	mov	x22, x0
	cbnz	w0, LBB0_21
; %bb.18:
	mov	x0, x20
	bl	_i915_gem_object_lock_interruptible
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.19:
	mov	x0, x20
	mov	x1, x21
	bl	_i915_gem_object_set_cache_level
	mov	x22, x0
	mov	x0, x20
	bl	_i915_gem_object_unlock
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_21:
	mov	x0, x20
	bl	_i915_gem_object_put
LBB0_22:
	mov	x0, x22
	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_23:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_CACHE_NONE,4,2            ; @I915_CACHE_NONE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_I915_CACHE_LLC,4,2             ; @I915_CACHE_LLC
	.comm	_I915_CACHE_WT,4,2              ; @I915_CACHE_WT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ; @I915_WAIT_INTERRUPTIBLE
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
.subsections_via_symbols
