	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_tiling            ## -- Begin function i915_gem_set_tiling
	.p2align	4, 0x90
_i915_gem_set_tiling:                   ## @i915_gem_set_tiling
	.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, %r13
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movl	24(%rsi), %eax
	movq	%rdx, %rsi
	movl	%eax, %edx
	callq	_drm_gem_object_lookup
	movl	%eax, %edi
	callq	_to_intel_bo
	movq	%rax, %r12
	leaq	48(%rax), %rbx
	movq	48(%rax), %rdx
	movq	(%r13), %rsi
	movq	8(%r13), %rcx
	movq	%r15, %rdi
	callq	_i915_tiling_ok
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpq	$0, 80(%r12)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_drm_gem_object_unreference_unlocked
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	%rbx, %rdi
	callq	_drm_gem_object_unreference_unlocked
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_34
LBB0_5:
	movq	8(%r13), %rcx
	movq	_I915_TILING_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_15
## %bb.6:
	movq	_I915_TILING_X@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.7:
	movq	8(%r14), %rcx
	jmp	LBB0_9
LBB0_8:
	movq	16(%r14), %rcx
LBB0_9:
	leaq	16(%r13), %rdx
	movq	%rcx, 16(%r13)
	movq	_I915_BIT_6_SWIZZLE_9_17@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_11
## %bb.10:
	movq	_I915_BIT_6_SWIZZLE_9@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rdx)
LBB0_11:
	movq	_I915_BIT_6_SWIZZLE_9_10_17@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_13
## %bb.12:
	movq	_I915_BIT_6_SWIZZLE_9_10@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rdx)
LBB0_13:
	movq	_I915_BIT_6_SWIZZLE_UNKNOWN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_16
## %bb.14:
	movq	%rax, 8(%r13)
LBB0_15:
	movq	_I915_BIT_6_SWIZZLE_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r13)
	movq	$0, (%r13)
LBB0_16:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	8(%r13), %rdx
	cmpq	(%r12), %rdx
	jne	LBB0_18
## %bb.17:
	movq	(%r13), %rax
	xorl	%ebx, %ebx
	cmpq	8(%r12), %rax
	je	LBB0_28
LBB0_18:
	cmpq	$0, 72(%r12)
	je	LBB0_35
## %bb.19:
	movq	48(%r12), %rsi
	movq	24(%r12), %rax
	addq	%rsi, %rax
	cmpq	(%r14), %rax
	jle	LBB0_20
## %bb.22:
	movl	$0, 16(%r12)
	jmp	LBB0_23
LBB0_35:
	movl	$1, 16(%r12)
	jmp	LBB0_25
LBB0_20:
	movq	%r12, %rdi
	movq	%rdx, %rsi
	callq	_i915_gem_object_fence_ok
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, 16(%r12)
	jne	LBB0_25
## %bb.21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	8(%r13), %rdx
LBB0_23:
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_i915_gem_get_gtt_alignment
	decl	%eax
	cltq
	testq	%rax, 24(%r12)
	je	LBB0_25
## %bb.24:
	movq	%r12, %rdi
	callq	_i915_gem_object_unbind
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_28
LBB0_25:
	movl	$1, %eax
	cmpq	$0, 64(%r12)
	jne	LBB0_27
## %bb.26:
	movq	40(%r12), %rcx
	movq	_I915_FENCE_REG_NONE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	setne	%al
LBB0_27:
	movl	%eax, 32(%r12)
	movdqu	(%r13), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, (%r12)
	movq	%r12, %rdi
	callq	_i915_gem_release_mmap
	xorl	%ebx, %ebx
LBB0_28:
	movdqu	(%r12), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, (%r13)
	movq	%r12, %rdi
	callq	_i915_gem_object_needs_bit17_swizzle
	movq	56(%r12), %rdi
	testq	%rax, %rax
	je	LBB0_31
## %bb.29:
	testq	%rdi, %rdi
	jne	LBB0_33
## %bb.30:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_BITS_TO_LONGS
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	jmp	LBB0_32
LBB0_31:
	callq	_kfree
	xorl	%eax, %eax
LBB0_32:
	movq	%rax, 56(%r12)
LBB0_33:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_gem_object_unreference
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_34:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.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
	.comm	_I915_FENCE_REG_NONE,8,3        ## @I915_FENCE_REG_NONE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_set_tiling            ; -- Begin function i915_gem_set_tiling
	.p2align	2
_i915_gem_set_tiling:                   ; @i915_gem_set_tiling
	.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	x8, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x23, [x0, #8]
	ldr	w2, [x1, #24]
	mov	x1, x8
	bl	_drm_gem_object_lookup
	bl	_to_intel_bo
	mov	x21, x0
	mov	x20, x0
	ldr	x2, [x20, #48]!
	ldp	x1, x3, [x22]
	mov	x0, x19
	bl	_i915_tiling_ok
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x8, [x21, #80]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_drm_gem_object_unreference_unlocked
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_drm_gem_object_unreference_unlocked
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_38
LBB0_5:
	ldr	x9, [x22, #8]
Lloh4:
	adrp	x8, _I915_TILING_NONE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _I915_TILING_NONE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
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, [x22, #16]
	b	LBB0_16
LBB0_7:
Lloh10:
	adrp	x10, _I915_TILING_X@GOTPAGE
Lloh11:
	ldr	x10, [x10, _I915_TILING_X@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.8:
	ldr	x9, [x23, #8]
	b	LBB0_10
LBB0_9:
	ldr	x9, [x23, #16]
LBB0_10:
	mov	x10, x22
	str	x9, [x10, #16]!
Lloh13:
	adrp	x11, _I915_BIT_6_SWIZZLE_9_17@GOTPAGE
Lloh14:
	ldr	x11, [x11, _I915_BIT_6_SWIZZLE_9_17@GOTPAGEOFF]
Lloh15:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_12
; %bb.11:
Lloh16:
	adrp	x9, _I915_BIT_6_SWIZZLE_9@GOTPAGE
Lloh17:
	ldr	x9, [x9, _I915_BIT_6_SWIZZLE_9@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	str	x9, [x10]
LBB0_12:
Lloh19:
	adrp	x11, _I915_BIT_6_SWIZZLE_9_10_17@GOTPAGE
Lloh20:
	ldr	x11, [x11, _I915_BIT_6_SWIZZLE_9_10_17@GOTPAGEOFF]
Lloh21:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_14
; %bb.13:
Lloh22:
	adrp	x9, _I915_BIT_6_SWIZZLE_9_10@GOTPAGE
Lloh23:
	ldr	x9, [x9, _I915_BIT_6_SWIZZLE_9_10@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	str	x9, [x10]
LBB0_14:
Lloh25:
	adrp	x10, _I915_BIT_6_SWIZZLE_UNKNOWN@GOTPAGE
Lloh26:
	ldr	x10, [x10, _I915_BIT_6_SWIZZLE_UNKNOWN@GOTPAGEOFF]
Lloh27:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_17
; %bb.15:
Lloh28:
	adrp	x9, _I915_BIT_6_SWIZZLE_NONE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _I915_BIT_6_SWIZZLE_NONE@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	stp	x8, x9, [x22, #8]
LBB0_16:
	str	xzr, [x22]
LBB0_17:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x2, [x22, #8]
	ldr	x8, [x21]
	cmp	x2, x8
	b.ne	LBB0_19
; %bb.18:
	ldr	x8, [x22]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.eq	LBB0_31
LBB0_19:
	ldr	x8, [x21, #72]
	cbz	x8, LBB0_22
; %bb.20:
	ldr	x8, [x21, #24]
	ldr	x1, [x21, #48]
	ldr	x9, [x23]
	add	x8, x1, x8
	cmp	x8, x9
	b.le	LBB0_23
; %bb.21:
	str	wzr, [x21, #16]
	b	LBB0_25
LBB0_22:
	mov	w8, #1
	str	w8, [x21, #16]
	b	LBB0_27
LBB0_23:
	mov	x0, x21
	mov	x1, x2
	bl	_i915_gem_object_fence_ok
	cmp	x0, #0
	cset	w8, ne
	str	w8, [x21, #16]
	cbnz	x0, LBB0_27
; %bb.24:
	ldr	x1, [x20]
	ldr	x2, [x22, #8]
LBB0_25:
	mov	x0, x19
	mov	w3, #0
	bl	_i915_gem_get_gtt_alignment
	ldr	x8, [x21, #24]
	sub	w9, w0, #1
	sxtw	x9, w9
	tst	x8, x9
	b.eq	LBB0_27
; %bb.26:
	mov	x0, x21
	bl	_i915_gem_object_unbind
	mov	x23, x0
	cbnz	w0, LBB0_32
LBB0_27:
	ldr	x8, [x21, #64]
	cbz	x8, LBB0_29
; %bb.28:
	mov	w8, #1
	b	LBB0_30
LBB0_29:
	ldr	x8, [x21, #40]
Lloh31:
	adrp	x9, _I915_FENCE_REG_NONE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _I915_FENCE_REG_NONE@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
LBB0_30:
	str	w8, [x21, #32]
	ldr	q0, [x22]
	ext.16b	v0, v0, v0, #8
	str	q0, [x21]
	mov	x0, x21
	bl	_i915_gem_release_mmap
LBB0_31:
	mov	w23, #0
LBB0_32:
	ldr	q0, [x21]
	ext.16b	v0, v0, v0, #8
	str	q0, [x22]
	mov	x0, x21
	bl	_i915_gem_object_needs_bit17_swizzle
	mov	x8, x0
	ldr	x0, [x21, #56]
	cbz	x8, LBB0_35
; %bb.33:
	cbnz	x0, LBB0_37
; %bb.34:
	ldr	x8, [x20]
Lloh34:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	asr	x0, x8, x9
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_BITS_TO_LONGS
	lsl	w0, w0, #3
Lloh37:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_kmalloc
	b	LBB0_36
LBB0_35:
	bl	_kfree
	mov	x0, #0
LBB0_36:
	str	x0, [x21, #56]
LBB0_37:
	mov	x0, x20
	bl	_drm_gem_object_unreference
	mov	x0, x19
	bl	_mutex_unlock
LBB0_38:
	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
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.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
	.comm	_I915_FENCE_REG_NONE,8,3        ; @I915_FENCE_REG_NONE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
