	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pin_and_fence_fb_obj     ## -- Begin function intel_pin_and_fence_fb_obj
	.p2align	4, 0x90
_intel_pin_and_fence_fb_obj:            ## @intel_pin_and_fence_fb_obj
	.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	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	xorl	%r12d, %r12d
	cmpl	$129, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_10
## %bb.3:
	movq	%rbx, %rdi
	callq	_IS_BROADWATER
	movl	$131072, %r12d                  ## imm = 0x20000
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_IS_CRESTLINE
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	movl	$4096, %eax                     ## imm = 0x1000
	movl	$65536, %r12d                   ## imm = 0x10000
	cmovgel	%eax, %r12d
LBB0_6:
	movl	$0, (%r13)
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_i915_gem_object_pin_to_display_plane
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	%r15, %rdi
	callq	_i915_gem_object_get_fence
	testl	%eax, %eax
	je	LBB0_8
## %bb.11:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_i915_gem_object_unpin
LBB0_12:
	movl	$1, (%r13)
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	movq	%r15, %rdi
	callq	_i915_gem_object_pin_fence
	movl	$1, (%r13)
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	callq	_BUG
	ud2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Y tiled not allowed for scan out buffers\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pin_and_fence_fb_obj     ; -- Begin function intel_pin_and_fence_fb_obj
	.p2align	2
_intel_pin_and_fence_fb_obj:            ; @intel_pin_and_fence_fb_obj
	.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
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x22, [x0]
	cmp	w8, #129
	b.ne	LBB0_4
; %bb.2:
	mov	w1, #0
	b	LBB0_8
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_4:
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.5:
	mov	x0, x21
	bl	_IS_BROADWATER
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_IS_CRESTLINE
	cbz	w0, LBB0_14
LBB0_7:
	mov	w1, #131072
LBB0_8:
	str	wzr, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_i915_gem_object_pin_to_display_plane
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_i915_gem_object_get_fence
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_i915_gem_object_unpin
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_i915_gem_object_pin_fence
LBB0_12:
	mov	w8, #1
	str	w8, [x22]
LBB0_13:
	mov	x0, x20
	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_14:
	mov	x0, x21
	bl	_INTEL_INFO
	ldr	w8, [x0]
	mov	w9, #65536
	mov	w10, #4096
	cmp	w8, #3
	csel	w1, w10, w9, gt
	b	LBB0_8
LBB0_15:
	bl	_BUG
	brk	#0x1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Y tiled not allowed for scan out buffers\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
