	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp500_enable_memwrite
_malidp500_enable_memwrite:             ## @malidp500_enable_memwrite
	.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
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_MALIDP500_SE_MEMWRITE_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_MALIDP_DE_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_malidp_get_block_base
	movq	_MALIDP_SCALE_ENGINE_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_MALIDP_DE_DISPLAY_FUNC@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_malidp_hw_setbits
	movq	(%rbx), %rax
	movq	_MW_NOT_ENABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_MW_START@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MW_RESTART@GOTPCREL(%rip), %rax
LBB0_3:
	movq	24(%rbp), %r13
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_MALIDP_MW_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%r12d, %edx
	movq	%rbx, %rdi
	movl	16(%rbp), %esi
	callq	_malidp_hw_write
	cmpl	$1, %r15d
	je	LBB0_6
## %bb.4:
	cmpl	$2, %r15d
	jne	LBB0_7
## %bb.5:
	movl	4(%r14), %edi
	callq	_lower_32_bits
	movq	_MALIDP_MW_P2_PTR_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	%r12d, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_malidp_hw_write
	movl	4(%r14), %edi
	callq	_upper_32_bits
	movq	_MALIDP_MW_P2_PTR_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	%r12d, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_malidp_hw_write
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	_MALIDP_MW_P2_STRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%r12d, %edx
	movq	%rbx, %rdi
	callq	_malidp_hw_write
LBB0_6:
	movl	(%r14), %edi
	callq	_lower_32_bits
	movq	_MALIDP_MW_P1_PTR_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	%r12d, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_malidp_hw_write
	movl	(%r14), %edi
	callq	_upper_32_bits
	movq	_MALIDP_MW_P1_PTR_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	%r12d, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_malidp_hw_write
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_MALIDP_MW_P1_STRIDE@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_malidp_hw_write
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
LBB0_8:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_MALIDP_DE_H_ACTIVE
	movl	%eax, %r14d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_MALIDP_DE_V_ACTIVE
	orl	%eax, %r14d
	movq	_MALIDP500_SE_MEMWRITE_OUT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_malidp_hw_write
	testq	%r13, %r13
	movq	%rbx, %r15
	je	LBB0_12
## %bb.9:
	movq	_MALIDP_COLORADJ_NUM_COEFFS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_12
## %bb.10:
	movq	%r13, %r14
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r13,4), %esi
	movq	_MALIDP500_SE_RGB_YUV_COEFFS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	%ebx, %edx
	movq	%r15, %rdi
	callq	_malidp_hw_write
	incq	%r13
	movslq	(%r12), %rax
	addl	$4, %ebx
	cmpq	%rax, %r13
	jl	LBB0_11
LBB0_12:
	movq	_MALIDP_SE_MEMWRITE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MALIDP500_SE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_malidp_hw_setbits
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MALIDP500_SE_MEMWRITE_BASE,4,2 ## @MALIDP500_SE_MEMWRITE_BASE
	.comm	_MALIDP_DE_BLOCK,4,2            ## @MALIDP_DE_BLOCK
	.comm	_MALIDP_SCALE_ENGINE_EN,4,2     ## @MALIDP_SCALE_ENGINE_EN
	.comm	_MALIDP_DE_DISPLAY_FUNC,4,2     ## @MALIDP_DE_DISPLAY_FUNC
	.comm	_MW_NOT_ENABLED,8,3             ## @MW_NOT_ENABLED
	.comm	_MW_RESTART,8,3                 ## @MW_RESTART
	.comm	_MW_START,8,3                   ## @MW_START
	.comm	_MALIDP_MW_FORMAT,4,2           ## @MALIDP_MW_FORMAT
	.comm	_MALIDP_MW_P2_PTR_LOW,4,2       ## @MALIDP_MW_P2_PTR_LOW
	.comm	_MALIDP_MW_P2_PTR_HIGH,4,2      ## @MALIDP_MW_P2_PTR_HIGH
	.comm	_MALIDP_MW_P2_STRIDE,4,2        ## @MALIDP_MW_P2_STRIDE
	.comm	_MALIDP_MW_P1_PTR_LOW,4,2       ## @MALIDP_MW_P1_PTR_LOW
	.comm	_MALIDP_MW_P1_PTR_HIGH,4,2      ## @MALIDP_MW_P1_PTR_HIGH
	.comm	_MALIDP_MW_P1_STRIDE,4,2        ## @MALIDP_MW_P1_STRIDE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid number of planes"

	.comm	_MALIDP500_SE_MEMWRITE_OUT_SIZE,4,2 ## @MALIDP500_SE_MEMWRITE_OUT_SIZE
	.comm	_MALIDP_COLORADJ_NUM_COEFFS,4,2 ## @MALIDP_COLORADJ_NUM_COEFFS
	.comm	_MALIDP500_SE_RGB_YUV_COEFFS,4,2 ## @MALIDP500_SE_RGB_YUV_COEFFS
	.comm	_MALIDP_SE_MEMWRITE_EN,4,2      ## @MALIDP_SE_MEMWRITE_EN
	.comm	_MALIDP500_SE_CONTROL,4,2       ## @MALIDP500_SE_CONTROL
	.no_dead_strip	_malidp500_enable_memwrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp500_enable_memwrite
_malidp500_enable_memwrite:             ; @malidp500_enable_memwrite
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x26, x6
	mov	x21, x5
	mov	x22, x4
	mov	x25, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MALIDP500_SE_MEMWRITE_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MALIDP500_SE_MEMWRITE_BASE@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
Lloh3:
	adrp	x8, _MALIDP_DE_BLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MALIDP_DE_BLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_malidp_get_block_base
Lloh6:
	adrp	x8, _MALIDP_SCALE_ENGINE_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MALIDP_SCALE_ENGINE_EN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w2, w8, w0
	mov	x0, x20
	bl	_malidp_hw_setbits
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _MW_NOT_ENABLED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MW_NOT_ENABLED@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _MW_START@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MW_START@GOTPAGEOFF]
Lloh17:
	adrp	x11, _MW_RESTART@GOTPAGE
Lloh18:
	ldr	x11, [x11, _MW_RESTART@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	x8, [x8]
	str	x8, [x20]
Lloh19:
	adrp	x8, _MALIDP_MW_FORMAT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MALIDP_MW_FORMAT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	add	w2, w8, w27
	mov	x0, x20
	mov	x1, x26
	bl	_malidp_hw_write
	cmp	w25, #1
	b.eq	LBB0_3
; %bb.1:
	cmp	w25, #2
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x24, #4]
	bl	_lower_32_bits
	mov	x1, x0
Lloh22:
	adrp	x8, _MALIDP_MW_P2_PTR_LOW@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MALIDP_MW_P2_PTR_LOW@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	add	w2, w8, w27
	mov	x0, x20
	bl	_malidp_hw_write
	ldr	w0, [x24, #4]
	bl	_upper_32_bits
	mov	x1, x0
Lloh25:
	adrp	x8, _MALIDP_MW_P2_PTR_HIGH@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MALIDP_MW_P2_PTR_HIGH@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	add	w2, w8, w27
	mov	x0, x20
	bl	_malidp_hw_write
	ldr	w1, [x23, #4]
Lloh28:
	adrp	x8, _MALIDP_MW_P2_STRIDE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MALIDP_MW_P2_STRIDE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	add	w2, w8, w27
	mov	x0, x20
	bl	_malidp_hw_write
LBB0_3:
	ldr	w0, [x24]
	bl	_lower_32_bits
	mov	x1, x0
Lloh31:
	adrp	x8, _MALIDP_MW_P1_PTR_LOW@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MALIDP_MW_P1_PTR_LOW@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	add	w2, w8, w27
	mov	x0, x20
	bl	_malidp_hw_write
	ldr	w0, [x24]
	bl	_upper_32_bits
	mov	x1, x0
Lloh34:
	adrp	x8, _MALIDP_MW_P1_PTR_HIGH@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MALIDP_MW_P1_PTR_HIGH@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	add	w2, w8, w27
	mov	x0, x20
	bl	_malidp_hw_write
	ldr	w1, [x23]
Lloh37:
	adrp	x8, _MALIDP_MW_P1_STRIDE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MALIDP_MW_P1_STRIDE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	add	w2, w8, w27
	mov	x0, x20
	bl	_malidp_hw_write
	b	LBB0_5
LBB0_4:
Lloh40:
	adrp	x1, l_.str@PAGE
Lloh41:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
LBB0_5:
	mov	x0, x22
	bl	_MALIDP_DE_H_ACTIVE
	mov	x22, x0
	mov	x0, x21
	bl	_MALIDP_DE_V_ACTIVE
	orr	w1, w0, w22
Lloh42:
	adrp	x8, _MALIDP500_SE_MEMWRITE_OUT_SIZE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MALIDP500_SE_MEMWRITE_OUT_SIZE@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_malidp_hw_write
	cbz	x19, LBB0_9
; %bb.6:
Lloh45:
	adrp	x21, _MALIDP_COLORADJ_NUM_COEFFS@GOTPAGE
Lloh46:
	ldr	x21, [x21, _MALIDP_COLORADJ_NUM_COEFFS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x22, #0
	mov	x23, #0
Lloh47:
	adrp	x24, _MALIDP500_SE_RGB_YUV_COEFFS@GOTPAGE
Lloh48:
	ldr	x24, [x24, _MALIDP500_SE_RGB_YUV_COEFFS@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, x22]
	ldr	w8, [x24]
	add	w2, w22, w8
	mov	x0, x20
	bl	_malidp_hw_write
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #4
	cmp	x23, x8
	b.lt	LBB0_8
LBB0_9:
Lloh49:
	adrp	x8, _MALIDP_SE_MEMWRITE_EN@GOTPAGE
Lloh50:
	ldr	x8, [x8, _MALIDP_SE_MEMWRITE_EN@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
Lloh52:
	adrp	x8, _MALIDP500_SE_CONTROL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _MALIDP500_SE_CONTROL@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_malidp_hw_setbits
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.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
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_MALIDP500_SE_MEMWRITE_BASE,4,2 ; @MALIDP500_SE_MEMWRITE_BASE
	.comm	_MALIDP_DE_BLOCK,4,2            ; @MALIDP_DE_BLOCK
	.comm	_MALIDP_SCALE_ENGINE_EN,4,2     ; @MALIDP_SCALE_ENGINE_EN
	.comm	_MALIDP_DE_DISPLAY_FUNC,4,2     ; @MALIDP_DE_DISPLAY_FUNC
	.comm	_MW_NOT_ENABLED,8,3             ; @MW_NOT_ENABLED
	.comm	_MW_RESTART,8,3                 ; @MW_RESTART
	.comm	_MW_START,8,3                   ; @MW_START
	.comm	_MALIDP_MW_FORMAT,4,2           ; @MALIDP_MW_FORMAT
	.comm	_MALIDP_MW_P2_PTR_LOW,4,2       ; @MALIDP_MW_P2_PTR_LOW
	.comm	_MALIDP_MW_P2_PTR_HIGH,4,2      ; @MALIDP_MW_P2_PTR_HIGH
	.comm	_MALIDP_MW_P2_STRIDE,4,2        ; @MALIDP_MW_P2_STRIDE
	.comm	_MALIDP_MW_P1_PTR_LOW,4,2       ; @MALIDP_MW_P1_PTR_LOW
	.comm	_MALIDP_MW_P1_PTR_HIGH,4,2      ; @MALIDP_MW_P1_PTR_HIGH
	.comm	_MALIDP_MW_P1_STRIDE,4,2        ; @MALIDP_MW_P1_STRIDE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid number of planes"

	.comm	_MALIDP500_SE_MEMWRITE_OUT_SIZE,4,2 ; @MALIDP500_SE_MEMWRITE_OUT_SIZE
	.comm	_MALIDP_COLORADJ_NUM_COEFFS,4,2 ; @MALIDP_COLORADJ_NUM_COEFFS
	.comm	_MALIDP500_SE_RGB_YUV_COEFFS,4,2 ; @MALIDP500_SE_RGB_YUV_COEFFS
	.comm	_MALIDP_SE_MEMWRITE_EN,4,2      ; @MALIDP_SE_MEMWRITE_EN
	.comm	_MALIDP500_SE_CONTROL,4,2       ; @MALIDP500_SE_CONTROL
	.no_dead_strip	_malidp500_enable_memwrite
.subsections_via_symbols
