	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_de_set_plane_afbc
_malidp_de_set_plane_afbc:              ## @malidp_de_set_plane_afbc
	.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	%rdi, %rbx
	movq	(%rdi), %rax
	movq	16(%rax), %r15
	callq	_to_malidp_plane
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.1:
	cmpl	$0, (%r15)
	je	LBB0_2
## %bb.4:
	movq	(%rbx), %rax
	movswl	2(%rax), %ecx
	movswl	6(%rax), %ebx
	movswl	10(%rax), %edi
	movswl	14(%rax), %r12d
	movl	4(%r15), %esi
	addl	%edi, %ecx
	subl	%ecx, %esi
	movq	_MALIDP_AD_CROP_RIGHT_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	orl	%edi, %esi
	movl	8(%r14), %edi
	movq	_MALIDP_AD_CROP_H@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	callq	_malidp_hw_write
	movl	8(%r15), %esi
	addl	%r12d, %ebx
	subl	%ebx, %esi
	movq	_MALIDP_AD_CROP_BOTTOM_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	orl	%r12d, %esi
	movl	8(%r14), %edi
	movq	(%r14), %rax
	movq	_MALIDP_AD_CROP_V@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	(%rax), %rdx
	callq	_malidp_hw_write
	movq	_MALIDP_AD_EN@GOTPCREL(%rip), %rcx
	movl	(%r15), %eax
	movq	_AFBC_FORMAT_MOD_SPLIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	andl	%eax, %esi
	je	LBB0_6
## %bb.5:
	movq	_MALIDP_AD_BS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
LBB0_6:
	orl	(%rcx), %esi
	movq	_AFBC_FORMAT_MOD_YTR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_8
## %bb.7:
	movq	_MALIDP_AD_YTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	orl	%eax, %esi
	movl	8(%r14), %edi
	movq	(%r14), %rax
	movq	(%rax), %rdx
	jmp	LBB0_3
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	8(%r14), %edi
	xorl	%esi, %esi
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_malidp_hw_write                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MALIDP_AD_CROP_RIGHT_OFFSET,4,2 ## @MALIDP_AD_CROP_RIGHT_OFFSET
	.comm	_MALIDP_AD_CROP_H,8,3           ## @MALIDP_AD_CROP_H
	.comm	_MALIDP_AD_CROP_BOTTOM_OFFSET,4,2 ## @MALIDP_AD_CROP_BOTTOM_OFFSET
	.comm	_MALIDP_AD_CROP_V,8,3           ## @MALIDP_AD_CROP_V
	.comm	_MALIDP_AD_EN,4,2               ## @MALIDP_AD_EN
	.comm	_AFBC_FORMAT_MOD_SPLIT,4,2      ## @AFBC_FORMAT_MOD_SPLIT
	.comm	_MALIDP_AD_BS,4,2               ## @MALIDP_AD_BS
	.comm	_AFBC_FORMAT_MOD_YTR,4,2        ## @AFBC_FORMAT_MOD_YTR
	.comm	_MALIDP_AD_YTR,4,2              ## @MALIDP_AD_YTR
	.no_dead_strip	_malidp_de_set_plane_afbc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp_de_set_plane_afbc
_malidp_de_set_plane_afbc:              ; @malidp_de_set_plane_afbc
	.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, x0
	ldr	x8, [x0]
	ldr	x21, [x8, #16]
	bl	_to_malidp_plane
	ldr	x8, [x0]
	ldr	x2, [x8]
	cbz	x2, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	x8, [x20]
	ldrsh	w9, [x8, #2]
	ldrsh	w20, [x8, #6]
	ldrsh	w10, [x8, #10]
	ldrsh	w22, [x8, #14]
	ldr	w8, [x21, #4]
	add	w9, w10, w9
	sub	w8, w8, w9
Lloh0:
	adrp	x9, _MALIDP_AD_CROP_RIGHT_OFFSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MALIDP_AD_CROP_RIGHT_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w1, w8, w10
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _MALIDP_AD_CROP_H@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MALIDP_AD_CROP_H@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x2, x8, x2
	bl	_malidp_hw_write
	ldr	w8, [x21, #8]
	add	w9, w22, w20
	sub	w8, w8, w9
Lloh6:
	adrp	x9, _MALIDP_AD_CROP_BOTTOM_OFFSET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MALIDP_AD_CROP_BOTTOM_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w1, w8, w22
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _MALIDP_AD_CROP_V@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MALIDP_AD_CROP_V@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x2, x9, x8
	bl	_malidp_hw_write
Lloh12:
	adrp	x8, _MALIDP_AD_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MALIDP_AD_EN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x21]
Lloh15:
	adrp	x10, _AFBC_FORMAT_MOD_SPLIT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AFBC_FORMAT_MOD_SPLIT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _MALIDP_AD_BS@GOTPAGE
Lloh19:
	ldr	x11, [x11, _MALIDP_AD_BS@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w10, w8
Lloh21:
	adrp	x10, _AFBC_FORMAT_MOD_YTR@GOTPAGE
Lloh22:
	ldr	x10, [x10, _AFBC_FORMAT_MOD_YTR@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
Lloh24:
	adrp	x11, _MALIDP_AD_YTR@GOTPAGE
Lloh25:
	ldr	x11, [x11, _MALIDP_AD_YTR@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w1, w8, w9
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	x2, [x8]
	b	LBB0_5
LBB0_3:
	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_4:
	ldr	w0, [x19, #8]
	mov	w1, #0
LBB0_5:
	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
	b	_malidp_hw_write
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MALIDP_AD_CROP_RIGHT_OFFSET,4,2 ; @MALIDP_AD_CROP_RIGHT_OFFSET
	.comm	_MALIDP_AD_CROP_H,8,3           ; @MALIDP_AD_CROP_H
	.comm	_MALIDP_AD_CROP_BOTTOM_OFFSET,4,2 ; @MALIDP_AD_CROP_BOTTOM_OFFSET
	.comm	_MALIDP_AD_CROP_V,8,3           ; @MALIDP_AD_CROP_V
	.comm	_MALIDP_AD_EN,4,2               ; @MALIDP_AD_EN
	.comm	_AFBC_FORMAT_MOD_SPLIT,4,2      ; @AFBC_FORMAT_MOD_SPLIT
	.comm	_MALIDP_AD_BS,4,2               ; @MALIDP_AD_BS
	.comm	_AFBC_FORMAT_MOD_YTR,4,2        ; @AFBC_FORMAT_MOD_YTR
	.comm	_MALIDP_AD_YTR,4,2              ; @MALIDP_AD_YTR
	.no_dead_strip	_malidp_de_set_plane_afbc
.subsections_via_symbols
