	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.3:
	movq	_I915_CACHE_LLC@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_I915_CACHE_NONE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r15d
	movq	%r12, %rdi
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movl	4(%r13), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_gem_object_lookup
	movl	%eax, %edi
	callq	_to_intel_bo
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_i915_gem_object_set_cache_level
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_drm_gem_object_unreference
	jmp	LBB0_8
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_CACHE_NONE,4,2            ## @I915_CACHE_NONE
	.comm	_I915_CACHE_LLC,4,2             ## @I915_CACHE_LLC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _I915_CACHE_LLC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_CACHE_LLC@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _I915_CACHE_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I915_CACHE_NONE@GOTPAGEOFF]
LBB0_4:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_i915_mutex_lock_interruptible
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.5:
	ldr	w2, [x21, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_drm_gem_object_lookup
	bl	_to_intel_bo
	cbz	x0, LBB0_8
; %bb.6:
	mov	x20, x0
	mov	x1, x22
	bl	_i915_gem_object_set_cache_level
	mov	x23, x0
	mov	x0, x20
	bl	_drm_gem_object_unreference
	b	LBB0_9
LBB0_7:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_10
LBB0_8:
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_CACHE_NONE,4,2            ; @I915_CACHE_NONE
	.comm	_I915_CACHE_LLC,4,2             ; @I915_CACHE_LLC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
