	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_object_pin_to_display_plane ## -- Begin function i915_gem_object_pin_to_display_plane
	.p2align	4, 0x90
_i915_gem_object_pin_to_display_plane:  ## @i915_gem_object_pin_to_display_plane
	.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
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_assert_object_held
	incl	(%rbx)
	movl	8(%rbx), %edi
	callq	_to_i915
	movl	%eax, %edi
	callq	_HAS_WT
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_I915_CACHE_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_I915_CACHE_WT@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i915_gem_object_set_cache_level
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %r13
	jmp	LBB0_5
LBB0_6:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %r13
	movq	_PIN_MAPPABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r15d, %r8d
	jne	LBB0_10
## %bb.7:
	testq	%r12, %r12
	je	LBB0_9
## %bb.8:
	movq	(%r12), %rax
	movq	_I915_GGTT_VIEW_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_9:
	orl	%r15d, %r8d
	movq	_PIN_NONBLOCK@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_i915_gem_object_ggtt_pin
	movq	%rax, %r13
LBB0_10:
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	callq	_i915_gem_object_ggtt_pin
	movq	%rax, %r13
LBB0_12:
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
LBB0_5:
	decl	(%rbx)
LBB0_14:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_u64@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	movl	%r14d, %edx
	callq	_max_t
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	callq	___i915_gem_object_flush_for_display
	movq	_I915_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_CACHE_WT,4,2              ## @I915_CACHE_WT
	.comm	_I915_CACHE_NONE,4,2            ## @I915_CACHE_NONE
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_PIN_MAPPABLE,4,2               ## @PIN_MAPPABLE
	.comm	_I915_GGTT_VIEW_NORMAL,8,3      ## @I915_GGTT_VIEW_NORMAL
	.comm	_PIN_NONBLOCK,4,2               ## @PIN_NONBLOCK
	.comm	_u64,4,2                        ## @u64
	.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_object_pin_to_display_plane ; -- Begin function i915_gem_object_pin_to_display_plane
	.p2align	2
_i915_gem_object_pin_to_display_plane:  ; @i915_gem_object_pin_to_display_plane
	.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	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	bl	_assert_object_held
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w0, [x19, #8]
	bl	_to_i915
	bl	_HAS_WT
Lloh0:
	adrp	x8, _I915_CACHE_WT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_CACHE_WT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _I915_CACHE_NONE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I915_CACHE_NONE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i915_gem_object_set_cache_level
	cbz	w0, LBB0_2
; %bb.1:
	bl	_ERR_PTR
	mov	x23, x0
	b	LBB0_9
LBB0_2:
Lloh4:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x23, x0
Lloh7:
	adrp	x8, _PIN_MAPPABLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PIN_MAPPABLE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_6
; %bb.3:
	cbz	x22, LBB0_5
; %bb.4:
	ldr	x9, [x22]
Lloh10:
	adrp	x10, _I915_GGTT_VIEW_NORMAL@GOTPAGE
Lloh11:
	ldr	x10, [x10, _I915_GGTT_VIEW_NORMAL@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
LBB0_5:
	orr	w8, w8, w21
Lloh13:
	adrp	x9, _PIN_NONBLOCK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PIN_NONBLOCK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w4, w8, w9
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	mov	x3, x20
	bl	_i915_gem_object_ggtt_pin
	mov	x23, x0
LBB0_6:
	mov	x0, x23
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	bl	_i915_gem_object_ggtt_pin
	mov	x23, x0
LBB0_8:
	mov	x0, x23
	bl	_IS_ERR
	cbz	x0, LBB0_11
LBB0_9:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
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
LBB0_11:
Lloh16:
	adrp	x8, _u64@GOTPAGE
Lloh17:
	ldr	x8, [x8, _u64@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w1, [x23]
	mov	x2, x20
	bl	_max_t
	str	w0, [x23]
	mov	x0, x19
	bl	___i915_gem_object_flush_for_display
Lloh19:
	adrp	x8, _I915_GEM_DOMAIN_GTT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _I915_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_CACHE_WT,4,2              ; @I915_CACHE_WT
	.comm	_I915_CACHE_NONE,4,2            ; @I915_CACHE_NONE
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_PIN_MAPPABLE,4,2               ; @PIN_MAPPABLE
	.comm	_I915_GGTT_VIEW_NORMAL,8,3      ; @I915_GGTT_VIEW_NORMAL
	.comm	_PIN_NONBLOCK,4,2               ; @PIN_NONBLOCK
	.comm	_u64,4,2                        ; @u64
	.comm	_I915_GEM_DOMAIN_GTT,4,2        ; @I915_GEM_DOMAIN_GTT
.subsections_via_symbols
