	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_plane_check_dst_coordinates
_skl_plane_check_dst_coordinates:       ## @skl_plane_check_dst_coordinates
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movl	(%rax), %edi
	callq	_to_i915
	movq	%rax, %r15
	movl	(%rbx), %r12d
	movq	%rbx, %rdi
	callq	_drm_rect_width
	movl	%eax, %ebx
	movl	(%r14), %r14d
	movq	%r15, %rdi
	callq	_IS_GEMINILAKE
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_IS_CANNONLAKE
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	addl	%r12d, %ebx
	addl	$-4, %r14d
	cmpl	$4, %ebx
	jge	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
	cmpl	%r14d, %r12d
	jle	LBB0_8
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %ebx
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	movl	$4, %ecx
	movl	%r14d, %r8d
	callq	_DRM_DEBUG_KMS
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"requested plane X %s position %d invalid (valid range %d-%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"end"

L_.str.2:                               ## @.str.2
	.asciz	"start"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_skl_plane_check_dst_coordinates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_plane_check_dst_coordinates
_skl_plane_check_dst_coordinates:       ; @skl_plane_check_dst_coordinates
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x1, #8]
	ldr	w0, [x8]
	bl	_to_i915
	mov	x19, x0
	ldr	w22, [x20]
	mov	x0, x20
	bl	_drm_rect_width
	mov	x20, x0
	ldr	w21, [x21]
	mov	x0, x19
	bl	_IS_GEMINILAKE
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_IS_CANNONLAKE
	cbz	x0, LBB0_8
LBB0_2:
	add	w2, w20, w22
	sub	w4, w21, #4
	cmp	w2, #4
	b.ge	LBB0_4
; %bb.3:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	cmp	w22, w4
	b.le	LBB0_7
; %bb.5:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x22
LBB0_6:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	w3, #4
	bl	_DRM_DEBUG_KMS
Lloh6:
	adrp	x8, _ERANGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"requested plane X %s position %d invalid (valid range %d-%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"end"

l_.str.2:                               ; @.str.2
	.asciz	"start"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_skl_plane_check_dst_coordinates
.subsections_via_symbols
