	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g2d_check_buf_desc_is_valid
_g2d_check_buf_desc_is_valid:           ## @g2d_check_buf_desc_is_valid
	.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	%rcx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_REG_TYPE_SRC@GOTPCREL(%rip), %rax
	movl	$1, %r12d
	cmpl	%edx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_REG_TYPE_DST@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_11
LBB0_2:
	movl	(%rbx), %eax
	subl	40(%rbx), %eax
	movq	_G2D_LEN_MIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_4
## %bb.3:
	movq	_G2D_LEN_MAX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %eax
	jle	LBB0_6
LBB0_4:
	movl	(%r15), %edi
	movslq	%eax, %rdx
	leaq	L_.str(%rip), %rsi
LBB0_5:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
LBB0_11:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	16(%rbx), %eax
	subl	32(%rbx), %eax
	cmpl	%ecx, %eax
	jl	LBB0_8
## %bb.7:
	cmpl	%edx, %eax
	jg	LBB0_8
## %bb.9:
	movl	24(%rbx), %edi
	callq	_g2d_get_buf_bpp
	movq	16(%rbx), %rcx
	decq	%rcx
	imulq	8(%rbx), %rcx
	imulq	(%rbx), %rax
	leaq	(%rcx,%rax), %rdx
	decq	%rdx
	cmpq	%r14, %rdx
	jb	LBB0_11
## %bb.10:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_11
LBB0_8:
	movl	(%r15), %edi
	movslq	%eax, %rdx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TYPE_SRC,4,2               ## @REG_TYPE_SRC
	.comm	_REG_TYPE_DST,4,2               ## @REG_TYPE_DST
	.comm	_G2D_LEN_MIN,4,2                ## @G2D_LEN_MIN
	.comm	_G2D_LEN_MAX,4,2                ## @G2D_LEN_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"width[%d] is out of range!\n"

L_.str.1:                               ## @.str.1
	.asciz	"height[%d] is out of range!\n"

L_.str.2:                               ## @.str.2
	.asciz	"last engine access position [%lu] is out of range [%lu]!\n"

	.no_dead_strip	_g2d_check_buf_desc_is_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g2d_check_buf_desc_is_valid
_g2d_check_buf_desc_is_valid:           ; @g2d_check_buf_desc_is_valid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _REG_TYPE_SRC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_TYPE_SRC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _REG_TYPE_DST@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REG_TYPE_DST@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w2
	ccmp	w9, w2, #4, ne
	b.ne	LBB0_8
; %bb.1:
	mov	x21, x1
	mov	x20, x0
	ldr	w9, [x1]
	ldr	w10, [x1, #40]
Lloh6:
	adrp	x8, _G2D_LEN_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _G2D_LEN_MIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	sub	w9, w9, w10
	cmp	w9, w8
	b.lt	LBB0_3
; %bb.2:
Lloh9:
	adrp	x10, _G2D_LEN_MAX@GOTPAGE
Lloh10:
	ldr	x10, [x10, _G2D_LEN_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w9, w10
	b.le	LBB0_5
LBB0_3:
	ldr	w0, [x20]
	sxtw	x2, w9
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_DRM_DEV_ERROR
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	ldr	w9, [x21, #16]
	ldr	w11, [x21, #32]
	sub	w9, w9, w11
	cmp	w9, w8
	ccmp	w9, w10, #0, ge
	b.le	LBB0_7
; %bb.6:
	ldr	w0, [x20]
	sxtw	x2, w9
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_7:
	mov	x19, x3
	ldr	w0, [x21, #24]
	bl	_g2d_get_buf_bpp
	ldp	x9, x8, [x21, #8]
	sub	x8, x8, #1
	ldr	x10, [x21]
	mul	x10, x10, x0
	madd	x8, x8, x9, x10
	sub	x2, x8, #1
	cmp	x2, x19
	b.hs	LBB0_10
LBB0_8:
	mov	w0, #1
LBB0_9:
	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
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	w0, [x20]
	str	x19, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TYPE_SRC,4,2               ; @REG_TYPE_SRC
	.comm	_REG_TYPE_DST,4,2               ; @REG_TYPE_DST
	.comm	_G2D_LEN_MIN,4,2                ; @G2D_LEN_MIN
	.comm	_G2D_LEN_MAX,4,2                ; @G2D_LEN_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"width[%d] is out of range!\n"

l_.str.1:                               ; @.str.1
	.asciz	"height[%d] is out of range!\n"

l_.str.2:                               ; @.str.2
	.asciz	"last engine access position [%lu] is out of range [%lu]!\n"

	.no_dead_strip	_g2d_check_buf_desc_is_valid
.subsections_via_symbols
