	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_verify_afbc_framebuffer_size
_malidp_verify_afbc_framebuffer_size:   ## @malidp_verify_afbc_framebuffer_size
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdx), %rax
	movq	_AFBC_SIZE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	cmpl	$128, %ecx
	jne	LBB0_3
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rsi
	callq	_drm_get_format_info
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	leal	15(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$4, %esi
	leal	15(%rdx), %r13d
	testl	%edx, %edx
	cmovnsl	%edx, %r13d
	sarl	$4, %r13d
	imull	%esi, %r13d
	movl	(%rax), %edi
	callq	_malidp_format_get_bpp
	movl	%eax, %r15d
	shll	$8, %eax
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %r12d
	movq	_AFBC_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	imull	%r13d, %edi
	movq	_AFBC_SUPERBLK_ALIGNMENT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_ALIGN
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r14), %esi
	movl	%r12d, %edi
	callq	_ALIGN
	movl	%eax, %r12d
	movl	8(%rbx), %edx
	movl	%edx, %eax
	imull	%r15d, %eax
	movq	16(%rbx), %rcx
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	imull	(%rcx), %esi
	cmpl	%esi, %eax
	jne	LBB0_2
## %bb.5:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	24(%rbx), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	imull	%r13d, %r12d
	addl	%r15d, %r12d
	movl	(%rax), %esi
	cmpl	%r12d, %esi
	jge	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_drm_gem_object_put_unlocked
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str(%rip), %rdi
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_9:
	movq	%r14, %rdi
	callq	_drm_gem_object_put_unlocked
	movl	$1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AFBC_SIZE_MASK,4,2             ## @AFBC_SIZE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AFBC superblock size is not supported\n"

	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.comm	_AFBC_HEADER_SIZE,4,2           ## @AFBC_HEADER_SIZE
	.comm	_AFBC_SUPERBLK_ALIGNMENT,4,2    ## @AFBC_SUPERBLK_ALIGNMENT
L_.str.1:                               ## @.str.1
	.asciz	"Invalid value of (pitch * BITS_PER_BYTE) (=%u) should be same as width (=%u) * bpp (=%u)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to lookup GEM object\n"

L_.str.3:                               ## @.str.3
	.asciz	"buffer size (%zu) too small for AFBC buffer size = %u\n"

	.no_dead_strip	_malidp_verify_afbc_framebuffer_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp_verify_afbc_framebuffer_size
_malidp_verify_afbc_framebuffer_size:   ; @malidp_verify_afbc_framebuffer_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x2]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _AFBC_SIZE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AFBC_SIZE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x1, x2
	bl	_drm_get_format_info
	ldp	w8, w9, [x20, #8]
	add	w10, w8, #15
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w8, w8, #4
	add	w10, w9, #15
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #4
	mul	w24, w9, w8
	ldr	w0, [x0]
	bl	_malidp_format_get_bpp
	mov	x21, x0
	lsl	w8, w0, #8
Lloh3:
	adrp	x25, _BITS_PER_BYTE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _BITS_PER_BYTE@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh5:
	adrp	x10, _AFBC_HEADER_SIZE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AFBC_HEADER_SIZE@GOTPAGEOFF]
	sdiv	w23, w8, w9
Lloh7:
	ldr	w8, [x10]
	mul	w0, w8, w24
Lloh8:
	adrp	x26, _AFBC_SUPERBLK_ALIGNMENT@GOTPAGE
Lloh9:
	ldr	x26, [x26, _AFBC_SUPERBLK_ALIGNMENT@GOTPAGEOFF]
	ldr	w1, [x26]
	bl	_ALIGN
	mov	x22, x0
	ldr	w1, [x26]
	mov	x0, x23
	bl	_ALIGN
	ldr	w8, [x20, #8]
	mul	w10, w8, w21
	ldr	x9, [x20, #16]
	ldr	w9, [x9]
	ldr	w11, [x25]
	mul	w9, w11, w9
	cmp	w10, w9
	b.ne	LBB0_6
; %bb.2:
	mov	x23, x0
	ldr	x8, [x20, #24]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_7
; %bb.3:
	mov	x19, x0
	madd	w8, w23, w24, w22
	ldr	w9, [x0]
	cmp	w9, w8
	b.ge	LBB0_11
; %bb.4:
	stp	x9, x8, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_drm_gem_object_put_unlocked
	b	LBB0_9
LBB0_5:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
	stp	x8, x21, [sp, #8]
	str	x9, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_DRM_DEBUG_KMS
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	mov	x0, x19
	bl	_drm_gem_object_put_unlocked
	mov	w0, #1
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AFBC_SIZE_MASK,4,2             ; @AFBC_SIZE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AFBC superblock size is not supported\n"

	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.comm	_AFBC_HEADER_SIZE,4,2           ; @AFBC_HEADER_SIZE
	.comm	_AFBC_SUPERBLK_ALIGNMENT,4,2    ; @AFBC_SUPERBLK_ALIGNMENT
l_.str.1:                               ; @.str.1
	.asciz	"Invalid value of (pitch * BITS_PER_BYTE) (=%u) should be same as width (=%u) * bpp (=%u)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to lookup GEM object\n"

l_.str.3:                               ; @.str.3
	.asciz	"buffer size (%zu) too small for AFBC buffer size = %u\n"

	.no_dead_strip	_malidp_verify_afbc_framebuffer_size
.subsections_via_symbols
