	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_fb_cfg_canvas
_aml8726_fb_cfg_canvas:                 ## @aml8726_fb_cfg_canvas
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	16(%rdi), %eax
	leal	7(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$3, %ebx
	movq	_AML_CAV_LUT_DATAL_WIDTH_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	movl	8(%rdi), %ecx
	movq	_AML_CAV_LUT_DATAL_WIDTH_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	leal	7(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$3, %edx
	orl	%eax, %edx
	movq	_AML_CAV_LUT_DATAL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CAV_WRITE_4
	movq	_AML_CAV_LUT_DATAL_WIDTH_WIDTH@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_AML_CAV_LUT_DATAH_WIDTH_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_AML_CAV_LUT_DATAH_WIDTH_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	(%r14), %edx
	movq	_AML_CAV_LUT_DATAH_HEIGHT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movq	_AML_CAV_LUT_DATAH_HEIGHT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	orl	%ebx, %edx
	movq	_AML_CAV_LUT_DATAH_BLKMODE_LINEAR@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_AML_CAV_LUT_DATAH_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_CAV_WRITE_4
	movq	_AML_CAV_LUT_ADDR_REG@GOTPCREL(%rip), %rbx
	movq	_AML_CAV_OSD1_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AML_CAV_LUT_ADDR_INDEX_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movl	(%rbx), %esi
	movq	_AML_CAV_LUT_ADDR_WR_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_CAV_WRITE_4
	movl	(%rbx), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_CAV_BARRIER                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AML_CAV_LUT_DATAL_WIDTH_SHIFT,4,2 ## @AML_CAV_LUT_DATAL_WIDTH_SHIFT
	.comm	_AML_CAV_LUT_DATAL_WIDTH_MASK,4,2 ## @AML_CAV_LUT_DATAL_WIDTH_MASK
	.comm	_AML_CAV_LUT_DATAL_REG,4,2      ## @AML_CAV_LUT_DATAL_REG
	.comm	_AML_CAV_LUT_DATAL_WIDTH_WIDTH,4,2 ## @AML_CAV_LUT_DATAL_WIDTH_WIDTH
	.comm	_AML_CAV_LUT_DATAH_WIDTH_SHIFT,4,2 ## @AML_CAV_LUT_DATAH_WIDTH_SHIFT
	.comm	_AML_CAV_LUT_DATAH_WIDTH_MASK,4,2 ## @AML_CAV_LUT_DATAH_WIDTH_MASK
	.comm	_AML_CAV_LUT_DATAH_HEIGHT_SHIFT,4,2 ## @AML_CAV_LUT_DATAH_HEIGHT_SHIFT
	.comm	_AML_CAV_LUT_DATAH_HEIGHT_MASK,4,2 ## @AML_CAV_LUT_DATAH_HEIGHT_MASK
	.comm	_AML_CAV_LUT_DATAH_BLKMODE_LINEAR,4,2 ## @AML_CAV_LUT_DATAH_BLKMODE_LINEAR
	.comm	_AML_CAV_LUT_DATAH_REG,4,2      ## @AML_CAV_LUT_DATAH_REG
	.comm	_AML_CAV_LUT_ADDR_REG,4,2       ## @AML_CAV_LUT_ADDR_REG
	.comm	_AML_CAV_LUT_ADDR_WR_EN,4,2     ## @AML_CAV_LUT_ADDR_WR_EN
	.comm	_AML_CAV_OSD1_INDEX,4,2         ## @AML_CAV_OSD1_INDEX
	.comm	_AML_CAV_LUT_ADDR_INDEX_SHIFT,4,2 ## @AML_CAV_LUT_ADDR_INDEX_SHIFT
	.no_dead_strip	_aml8726_fb_cfg_canvas
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_fb_cfg_canvas
_aml8726_fb_cfg_canvas:                 ; @aml8726_fb_cfg_canvas
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0, #16]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w20, w8, #3
Lloh0:
	adrp	x8, _AML_CAV_LUT_DATAL_WIDTH_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AML_CAV_LUT_DATAL_WIDTH_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w8, w20, w8
Lloh3:
	adrp	x9, _AML_CAV_LUT_DATAL_WIDTH_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AML_CAV_LUT_DATAL_WIDTH_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w9
	ldr	w9, [x0, #8]
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w2, w8, w9, asr #3
Lloh6:
	adrp	x8, _AML_CAV_LUT_DATAL_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AML_CAV_LUT_DATAL_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_CAV_WRITE_4
Lloh9:
	adrp	x8, _AML_CAV_LUT_DATAL_WIDTH_WIDTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AML_CAV_LUT_DATAL_WIDTH_WIDTH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _AML_CAV_LUT_DATAH_WIDTH_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AML_CAV_LUT_DATAH_WIDTH_SHIFT@GOTPAGEOFF]
	asr	w8, w20, w8
Lloh14:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh15:
	adrp	x9, _AML_CAV_LUT_DATAH_WIDTH_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AML_CAV_LUT_DATAH_WIDTH_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w8, w8, w9
	ldr	w9, [x19]
Lloh18:
	adrp	x10, _AML_CAV_LUT_DATAH_HEIGHT_SHIFT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _AML_CAV_LUT_DATAH_HEIGHT_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh21:
	adrp	x10, _AML_CAV_LUT_DATAH_HEIGHT_MASK@GOTPAGE
Lloh22:
	ldr	x10, [x10, _AML_CAV_LUT_DATAH_HEIGHT_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	and	w9, w9, w10
Lloh24:
	adrp	x10, _AML_CAV_LUT_DATAH_BLKMODE_LINEAR@GOTPAGE
Lloh25:
	ldr	x10, [x10, _AML_CAV_LUT_DATAH_BLKMODE_LINEAR@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh26:
	ldr	w9, [x10]
	orr	w2, w8, w9
Lloh27:
	adrp	x8, _AML_CAV_LUT_DATAH_REG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AML_CAV_LUT_DATAH_REG@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CAV_WRITE_4
Lloh30:
	adrp	x20, _AML_CAV_LUT_ADDR_REG@GOTPAGE
Lloh31:
	ldr	x20, [x20, _AML_CAV_LUT_ADDR_REG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh32:
	adrp	x8, _AML_CAV_LUT_ADDR_WR_EN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AML_CAV_LUT_ADDR_WR_EN@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _AML_CAV_OSD1_INDEX@GOTPAGE
Lloh36:
	ldr	x9, [x9, _AML_CAV_OSD1_INDEX@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
Lloh38:
	adrp	x10, _AML_CAV_LUT_ADDR_INDEX_SHIFT@GOTPAGE
Lloh39:
	ldr	x10, [x10, _AML_CAV_LUT_ADDR_INDEX_SHIFT@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w2, w9, w8
	mov	x0, x19
	bl	_CAV_WRITE_4
	ldr	w1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CAV_BARRIER
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.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	_AML_CAV_LUT_DATAL_WIDTH_SHIFT,4,2 ; @AML_CAV_LUT_DATAL_WIDTH_SHIFT
	.comm	_AML_CAV_LUT_DATAL_WIDTH_MASK,4,2 ; @AML_CAV_LUT_DATAL_WIDTH_MASK
	.comm	_AML_CAV_LUT_DATAL_REG,4,2      ; @AML_CAV_LUT_DATAL_REG
	.comm	_AML_CAV_LUT_DATAL_WIDTH_WIDTH,4,2 ; @AML_CAV_LUT_DATAL_WIDTH_WIDTH
	.comm	_AML_CAV_LUT_DATAH_WIDTH_SHIFT,4,2 ; @AML_CAV_LUT_DATAH_WIDTH_SHIFT
	.comm	_AML_CAV_LUT_DATAH_WIDTH_MASK,4,2 ; @AML_CAV_LUT_DATAH_WIDTH_MASK
	.comm	_AML_CAV_LUT_DATAH_HEIGHT_SHIFT,4,2 ; @AML_CAV_LUT_DATAH_HEIGHT_SHIFT
	.comm	_AML_CAV_LUT_DATAH_HEIGHT_MASK,4,2 ; @AML_CAV_LUT_DATAH_HEIGHT_MASK
	.comm	_AML_CAV_LUT_DATAH_BLKMODE_LINEAR,4,2 ; @AML_CAV_LUT_DATAH_BLKMODE_LINEAR
	.comm	_AML_CAV_LUT_DATAH_REG,4,2      ; @AML_CAV_LUT_DATAH_REG
	.comm	_AML_CAV_LUT_ADDR_REG,4,2       ; @AML_CAV_LUT_ADDR_REG
	.comm	_AML_CAV_LUT_ADDR_WR_EN,4,2     ; @AML_CAV_LUT_ADDR_WR_EN
	.comm	_AML_CAV_OSD1_INDEX,4,2         ; @AML_CAV_OSD1_INDEX
	.comm	_AML_CAV_LUT_ADDR_INDEX_SHIFT,4,2 ; @AML_CAV_LUT_ADDR_INDEX_SHIFT
	.no_dead_strip	_aml8726_fb_cfg_canvas
.subsections_via_symbols
