	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_ovl_layer_config
_mtk_ovl_layer_config:                  ## @mtk_ovl_layer_config
	.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, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_comp_to_ovl
	movq	%rax, %r12
	movl	(%r15), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %r13d
	movzwl	4(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	12(%r15), %eax
	shll	$16, %eax
	orl	16(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	20(%r15), %eax
	shll	$16, %eax
	orl	24(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpq	$0, 32(%r15)
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mtk_ovl_layer_off
LBB0_2:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_ovl_fmt_convert
	movq	_OVL_CON_AEN@GOTPCREL(%rip), %rcx
	movq	_OVL_CON_ALPHA@GOTPCREL(%rip), %rdx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %r12d
	orl	(%rcx), %r12d
	testl	%ebx, %ebx
	cmovel	%ebx, %r12d
	orl	%eax, %r12d
	movq	%r14, %r13
	movq	(%r14), %r14
	movl	%ebx, %edi
	callq	_DISP_REG_OVL_CON
	addq	%rax, %r14
	movl	%r12d, %edi
	movq	%r14, %rsi
	movl	%ebx, %r14d
	callq	_writel_relaxed
	movq	(%r13), %rbx
	movl	%r14d, %edi
	callq	_DISP_REG_OVL_PITCH
	addq	%rax, %rbx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_writel_relaxed
	movq	(%r13), %rbx
	movl	%r14d, %edi
	callq	_DISP_REG_OVL_SRC_SIZE
	addq	%rax, %rbx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_writel_relaxed
	movq	(%r13), %rbx
	movl	%r14d, %edi
	callq	_DISP_REG_OVL_OFFSET
	addq	%rax, %rbx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_writel_relaxed
	movq	%r13, %r12
	movq	(%r13), %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_DISP_REG_OVL_ADDR
	addq	%rax, %rbx
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_writel_relaxed
	cmpq	$0, 32(%r15)
	je	LBB0_3
## %bb.4:
	movq	%r12, %rdi
	movl	%r14d, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtk_ovl_layer_on               ## TAILCALL
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OVL_CON_AEN,4,2                ## @OVL_CON_AEN
	.comm	_OVL_CON_ALPHA,4,2              ## @OVL_CON_ALPHA
	.no_dead_strip	_mtk_ovl_layer_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_ovl_layer_config
_mtk_ovl_layer_config:                  ; @mtk_ovl_layer_config
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_comp_to_ovl
	mov	x23, x0
	ldr	w22, [x21]
	ldrh	w26, [x21, #4]
	ldp	w27, w8, [x21, #8]
	ldp	w9, w10, [x21, #16]
	orr	w24, w9, w8, lsl #16
	ldr	w8, [x21, #24]
	orr	w25, w8, w10, lsl #16
	ldr	x8, [x21, #32]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_ovl_layer_off
LBB0_2:
	mov	x0, x23
	mov	x1, x27
	bl	_ovl_fmt_convert
Lloh0:
	adrp	x8, _OVL_CON_AEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OVL_CON_AEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _OVL_CON_ALPHA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OVL_CON_ALPHA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w19, #0
	csel	w8, wzr, w8, eq
	orr	w27, w8, w0
	ldr	x28, [x20]
	mov	x0, x19
	bl	_DISP_REG_OVL_CON
	add	x1, x0, x28
	mov	x0, x27
	bl	_writel_relaxed
	ldr	x27, [x20]
	mov	x0, x19
	bl	_DISP_REG_OVL_PITCH
	add	x1, x0, x27
	mov	x0, x26
	bl	_writel_relaxed
	ldr	x26, [x20]
	mov	x0, x19
	bl	_DISP_REG_OVL_SRC_SIZE
	add	x1, x0, x26
	mov	x0, x25
	bl	_writel_relaxed
	ldr	x25, [x20]
	mov	x0, x19
	bl	_DISP_REG_OVL_OFFSET
	add	x1, x0, x25
	mov	x0, x24
	bl	_writel_relaxed
	ldr	x24, [x20]
	mov	x0, x23
	mov	x1, x19
	bl	_DISP_REG_OVL_ADDR
	add	x1, x0, x24
	mov	x0, x22
	bl	_writel_relaxed
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	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
	b	_mtk_ovl_layer_on
LBB0_4:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_OVL_CON_AEN,4,2                ; @OVL_CON_AEN
	.comm	_OVL_CON_ALPHA,4,2              ; @OVL_CON_ALPHA
	.no_dead_strip	_mtk_ovl_layer_config
.subsections_via_symbols
