	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_tiling_ioctl      ## -- Begin function i915_gem_set_tiling_ioctl
	.p2align	4, 0x90
_i915_gem_set_tiling_ioctl:             ## @i915_gem_set_tiling_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	%rsi, %r14
	movq	%rdi, %r15
	movl	24(%rsi), %esi
	movq	%rdx, %rdi
	callq	_i915_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_i915_gem_object_is_proxy
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movq	%r12, %rdi
	callq	_i915_gem_object_put
	jmp	LBB0_21
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r14), %rsi
	movq	16(%r14), %rdx
	movq	%r12, %rdi
	callq	_i915_tiling_ok
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	(%r14), %rbx
	movq	_I915_TILING_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_17
## %bb.8:
	movq	_I915_TILING_X@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r15, %rdi
	callq	_to_i915
	cmpq	%r13, %rbx
	jne	LBB0_10
## %bb.9:
	movq	(%rax), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_10:
	movq	8(%rax), %rax
LBB0_11:
	leaq	8(%r14), %rcx
	movq	%rax, 8(%r14)
	movq	_I915_BIT_6_SWIZZLE_9_17@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_13
## %bb.12:
	movq	_I915_BIT_6_SWIZZLE_9@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rcx)
LBB0_13:
	movq	_I915_BIT_6_SWIZZLE_9_10_17@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_15
## %bb.14:
	movq	_I915_BIT_6_SWIZZLE_9_10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rcx)
LBB0_15:
	movq	_I915_BIT_6_SWIZZLE_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.16:
	movq	_I915_TILING_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_17:
	movq	_I915_BIT_6_SWIZZLE_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	$0, 16(%r14)
LBB0_18:
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	(%r14), %rsi
	movq	16(%r14), %rdx
	movq	%r12, %rdi
	callq	_i915_gem_object_set_tiling
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	callq	_i915_gem_object_get_stride
	movq	%rax, 16(%r14)
	movq	%r12, %rdi
	callq	_i915_gem_object_get_tiling
	movq	%rax, (%r14)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I915_TILING_NONE,8,3           ## @I915_TILING_NONE
	.comm	_I915_BIT_6_SWIZZLE_NONE,8,3    ## @I915_BIT_6_SWIZZLE_NONE
	.comm	_I915_TILING_X,8,3              ## @I915_TILING_X
	.comm	_I915_BIT_6_SWIZZLE_9_17,8,3    ## @I915_BIT_6_SWIZZLE_9_17
	.comm	_I915_BIT_6_SWIZZLE_9,8,3       ## @I915_BIT_6_SWIZZLE_9
	.comm	_I915_BIT_6_SWIZZLE_9_10_17,8,3 ## @I915_BIT_6_SWIZZLE_9_10_17
	.comm	_I915_BIT_6_SWIZZLE_9_10,8,3    ## @I915_BIT_6_SWIZZLE_9_10
	.comm	_I915_BIT_6_SWIZZLE_UNKNOWN,8,3 ## @I915_BIT_6_SWIZZLE_UNKNOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_tiling_ioctl      ; -- Begin function i915_gem_set_tiling_ioctl
	.p2align	2
_i915_gem_set_tiling_ioctl:             ; @i915_gem_set_tiling_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, x1
	mov	x21, x0
	ldr	w1, [x1, #24]
	mov	x0, x2
	bl	_i915_gem_object_lookup
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_i915_gem_object_is_proxy
	cbz	x0, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x19
	bl	_i915_gem_object_put
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	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
LBB0_7:
	ldr	x1, [x20]
	ldr	x2, [x20, #16]
	mov	x0, x19
	bl	_i915_tiling_ok
	cbz	w0, LBB0_10
; %bb.8:
	ldr	x23, [x20]
Lloh5:
	adrp	x22, _I915_TILING_NONE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _I915_TILING_NONE@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x23, x8
	b.ne	LBB0_11
; %bb.9:
Lloh7:
	adrp	x8, _I915_BIT_6_SWIZZLE_NONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I915_BIT_6_SWIZZLE_NONE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x20, #8]
	b	LBB0_20
LBB0_10:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
Lloh12:
	adrp	x8, _I915_TILING_X@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I915_TILING_X@GOTPAGEOFF]
Lloh14:
	ldr	x24, [x8]
	mov	x0, x21
	bl	_to_i915
	cmp	x23, x24
	b.ne	LBB0_13
; %bb.12:
	ldr	x8, [x0]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x0, #8]
LBB0_14:
	mov	x9, x20
	str	x8, [x9, #8]!
Lloh15:
	adrp	x10, _I915_BIT_6_SWIZZLE_9_17@GOTPAGE
Lloh16:
	ldr	x10, [x10, _I915_BIT_6_SWIZZLE_9_17@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_16
; %bb.15:
Lloh18:
	adrp	x8, _I915_BIT_6_SWIZZLE_9@GOTPAGE
Lloh19:
	ldr	x8, [x8, _I915_BIT_6_SWIZZLE_9@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	str	x8, [x9]
LBB0_16:
Lloh21:
	adrp	x10, _I915_BIT_6_SWIZZLE_9_10_17@GOTPAGE
Lloh22:
	ldr	x10, [x10, _I915_BIT_6_SWIZZLE_9_10_17@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_18
; %bb.17:
Lloh24:
	adrp	x8, _I915_BIT_6_SWIZZLE_9_10@GOTPAGE
Lloh25:
	ldr	x8, [x8, _I915_BIT_6_SWIZZLE_9_10@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x9]
LBB0_18:
Lloh27:
	adrp	x9, _I915_BIT_6_SWIZZLE_UNKNOWN@GOTPAGE
Lloh28:
	ldr	x9, [x9, _I915_BIT_6_SWIZZLE_UNKNOWN@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.19:
	ldr	x8, [x22]
Lloh30:
	adrp	x9, _I915_BIT_6_SWIZZLE_NONE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _I915_BIT_6_SWIZZLE_NONE@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	stp	x8, x9, [x20]
LBB0_20:
	str	xzr, [x20, #16]
LBB0_21:
	mov	x0, x21
	bl	_mutex_lock_interruptible
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.22:
	ldr	x1, [x20]
	ldr	x2, [x20, #16]
	mov	x0, x19
	bl	_i915_gem_object_set_tiling
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_i915_gem_object_get_stride
	str	x0, [x20, #16]
	mov	x0, x19
	bl	_i915_gem_object_get_tiling
	str	x0, [x20]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I915_TILING_NONE,8,3           ; @I915_TILING_NONE
	.comm	_I915_BIT_6_SWIZZLE_NONE,8,3    ; @I915_BIT_6_SWIZZLE_NONE
	.comm	_I915_TILING_X,8,3              ; @I915_TILING_X
	.comm	_I915_BIT_6_SWIZZLE_9_17,8,3    ; @I915_BIT_6_SWIZZLE_9_17
	.comm	_I915_BIT_6_SWIZZLE_9,8,3       ; @I915_BIT_6_SWIZZLE_9
	.comm	_I915_BIT_6_SWIZZLE_9_10_17,8,3 ; @I915_BIT_6_SWIZZLE_9_10_17
	.comm	_I915_BIT_6_SWIZZLE_9_10,8,3    ; @I915_BIT_6_SWIZZLE_9_10
	.comm	_I915_BIT_6_SWIZZLE_UNKNOWN,8,3 ; @I915_BIT_6_SWIZZLE_UNKNOWN
.subsections_via_symbols
