	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a10fb_setup_tcon
_a10fb_setup_tcon:                      ## @a10fb_setup_tcon
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	_VID_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edx, %edx
	andl	(%rsi), %r15d
	setne	%dl
	movl	4(%rsi), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movl	8(%rsi), %esi
	movl	12(%rbx), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	16(%rbx), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movl	20(%rbx), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	24(%rbx), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	28(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	32(%rbx), %r14d
	movl	%r14d, %edi
	movl	%esi, -88(%rbp)                 ## 4-byte Spill
	callq	_VBLANK_LEN
	movl	%eax, %edi
	callq	_START_DELAY
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rdx
	leaq	-96(%rbp), %rcx
	xorl	%esi, %esi
	callq	_hwreset_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_17
LBB0_2:
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movl	%r15d, -76(%rbp)                ## 4-byte Spill
	movl	-96(%rbp), %edi
	callq	_hwreset_deassert
	movl	(%r13), %edi
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_17
LBB0_4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.3(%rip), %rdx
	leaq	-100(%rbp), %rcx
	xorl	%esi, %esi
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_17
LBB0_6:
	movl	-100(%rbp), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r12d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_17
LBB0_8:
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	subl	%eax, -68(%rbp)                 ## 4-byte Folded Spill
	subl	%eax, -64(%rbp)                 ## 4-byte Folded Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	subl	%eax, -72(%rbp)                 ## 4-byte Folded Spill
	subl	%eax, -60(%rbp)                 ## 4-byte Folded Spill
	movq	_TCON_GCTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_TCON_WRITE
	movq	_TCON1_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_TCON_WRITE
	movq	_TCON0_DCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DCLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_TCON_WRITE
	movq	_TCON1_IO_TRI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IO_TRI_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_TCON_WRITE
	movl	(%r12), %esi
	movq	_GCTL_IO_MAP_SEL_TCON1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_TCON_WRITE
	movq	_TCON1_BASIC0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-84(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_BASIC_X
	movl	%eax, %r12d
	movl	-88(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	callq	_BASIC_Y
	orl	%eax, %r12d
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_TCON_WRITE
	movq	_TCON1_BASIC1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edi
	callq	_BASIC_X
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_BASIC_Y
	orl	%eax, %r12d
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_TCON_WRITE
	movq	_TCON1_BASIC2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edi
	callq	_BASIC_X
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_BASIC_Y
	orl	%eax, %r12d
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_TCON_WRITE
	movq	_TCON1_BASIC3@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	20(%rbx), %edi
	callq	_BASIC3_HT
	movl	%eax, %r13d
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	callq	_BASIC3_HBP
	orl	%eax, %r13d
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_TCON_WRITE
	movl	32(%rbx), %edi
	callq	_VTOTAL
	movl	%eax, %r12d
	movl	-76(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	movl	36(%rbx), %edi
	callq	_DOT_CLOCK_TO_HZ
	movl	20(%rbx), %esi
	movl	%eax, %edi
	callq	_DIVIDE
	movl	32(%rbx), %esi
	movl	%eax, %edi
	callq	_DIVIDE
	movl	%eax, %r13d
	movl	32(%rbx), %edi
	imull	20(%rbx), %r13d
	callq	_VTOTAL
	incl	%eax
	imull	%r13d, %eax
	movl	%eax, %r14d
	shrl	$31, %r14d
	addl	%eax, %r14d
	sarl	%r14d
	movl	36(%rbx), %edi
	callq	_DOT_CLOCK_TO_HZ
	xorl	%ecx, %ecx
	cmpl	%eax, %r14d
	sete	%cl
	addl	%ecx, %r12d
LBB0_10:
	movq	_TCON1_BASIC4@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r12d, %edi
	callq	_BASIC4_VT
	movl	%eax, %r12d
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_BASIC4_VBP
	orl	%eax, %r12d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_TCON_WRITE
	movq	_TCON1_BASIC5@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	callq	_BASIC5_HSPW
	movl	%eax, %r12d
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	callq	_BASIC5_VSPW
	orl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_TCON_WRITE
	movq	_IO_POL_IO2_INV@GOTPCREL(%rip), %rcx
	movl	(%rbx), %eax
	movq	_VID_PHSYNC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	je	LBB0_12
## %bb.11:
	movq	_IO_POL_PHSYNC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_12:
	orl	(%rcx), %edx
	movq	_VID_PVSYNC@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	-92(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_14
## %bb.13:
	movq	_IO_POL_PVSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	orl	%eax, %edx
	movq	_TCON1_IO_POL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_TCON_WRITE
	movq	_TCON_GINT1@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r13d, %edi
	callq	_GINT1_TCON1_LINENO
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_TCON_WRITE
	movq	_TCON1_EN@GOTPCREL(%rip), %rax
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.15:
	movq	_INTERLACE_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_16:
	orl	(%rax), %r15d
	movl	%r13d, %edi
	callq	_TCON1_START_DELAY
	movl	%eax, %r12d
	movq	_TCON1_SRC_CH1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TCON1_SRC_SEL
	orl	%eax, %r12d
	orl	%r15d, %r12d
	movq	_TCON1_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_TCON_WRITE
	movl	36(%rbx), %edi
	callq	_DOT_CLOCK_TO_HZ
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_a10fb_setup_pll
	movl	%eax, %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VID_INTERLACE,4,2              ## @VID_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lcd"

L_.str.1:                               ## @.str.1
	.asciz	"cannot find reset 'lcd'\n"

L_.str.2:                               ## @.str.2
	.asciz	"couldn't de-assert reset 'lcd'\n"

L_.str.3:                               ## @.str.3
	.asciz	"ahb_lcd"

L_.str.4:                               ## @.str.4
	.asciz	"cannot find clk 'ahb_lcd'\n"

L_.str.5:                               ## @.str.5
	.asciz	"cannot enable clk 'ahb_lcd'\n"

	.comm	_TCON_GCTL,4,2                  ## @TCON_GCTL
	.comm	_TCON1_CTL,4,2                  ## @TCON1_CTL
	.comm	_TCON0_DCLK,4,2                 ## @TCON0_DCLK
	.comm	_DCLK_EN,4,2                    ## @DCLK_EN
	.comm	_TCON1_IO_TRI,4,2               ## @TCON1_IO_TRI
	.comm	_IO_TRI_MASK,4,2                ## @IO_TRI_MASK
	.comm	_GCTL_IO_MAP_SEL_TCON1,4,2      ## @GCTL_IO_MAP_SEL_TCON1
	.comm	_TCON1_BASIC0,4,2               ## @TCON1_BASIC0
	.comm	_TCON1_BASIC1,4,2               ## @TCON1_BASIC1
	.comm	_TCON1_BASIC2,4,2               ## @TCON1_BASIC2
	.comm	_TCON1_BASIC3,4,2               ## @TCON1_BASIC3
	.comm	_TCON1_BASIC4,4,2               ## @TCON1_BASIC4
	.comm	_TCON1_BASIC5,4,2               ## @TCON1_BASIC5
	.comm	_IO_POL_IO2_INV,4,2             ## @IO_POL_IO2_INV
	.comm	_VID_PHSYNC,4,2                 ## @VID_PHSYNC
	.comm	_IO_POL_PHSYNC,4,2              ## @IO_POL_PHSYNC
	.comm	_VID_PVSYNC,4,2                 ## @VID_PVSYNC
	.comm	_IO_POL_PVSYNC,4,2              ## @IO_POL_PVSYNC
	.comm	_TCON1_IO_POL,4,2               ## @TCON1_IO_POL
	.comm	_TCON_GINT1,4,2                 ## @TCON_GINT1
	.comm	_TCON1_EN,4,2                   ## @TCON1_EN
	.comm	_INTERLACE_EN,4,2               ## @INTERLACE_EN
	.comm	_TCON1_SRC_CH1,4,2              ## @TCON1_SRC_CH1
	.no_dead_strip	_a10fb_setup_tcon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a10fb_setup_tcon
_a10fb_setup_tcon:                      ; @a10fb_setup_tcon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _VID_INTERLACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VID_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w10, [x1]
	ands	w8, w8, w9
	stp	w10, w8, [sp, #32]              ; 8-byte Folded Spill
	cset	w2, ne
	ldp	w28, w8, [x1, #8]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	ldp	w24, w25, [x1, #16]
	ldp	w23, w26, [x1, #24]
	ldr	w21, [x1, #32]
	mov	x0, x21
	mov	x1, x28
	bl	_VBLANK_LEN
	bl	_START_DELAY
	mov	x27, x0
	ldr	w0, [x19]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x3, sp, #40
	mov	w1, #0
	bl	_hwreset_get_by_ofw_name
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
	b	LBB0_11
LBB0_2:
	stp	w25, w24, [sp, #12]             ; 8-byte Folded Spill
	stp	w23, w26, [sp, #20]             ; 8-byte Folded Spill
	ldr	w0, [sp, #40]
	bl	_hwreset_deassert
	mov	x22, x0
	ldr	w0, [x19]
	cbz	w22, LBB0_4
; %bb.3:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	b	LBB0_11
LBB0_4:
Lloh9:
	adrp	x2, l_.str.3@PAGE
Lloh10:
	add	x2, x2, l_.str.3@PAGEOFF
	add	x3, sp, #44
	mov	w1, #0
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_6
; %bb.5:
	mov	x22, x0
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_device_printf
	b	LBB0_11
LBB0_6:
	ldr	w0, [sp, #44]
	bl	_clk_enable
	cbz	w0, LBB0_8
; %bb.7:
	mov	x22, x0
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_device_printf
	b	LBB0_11
LBB0_8:
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	sub	w8, w8, w9
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	sub	w23, w8, w9
	ldp	w8, w9, [sp, #20]               ; 8-byte Folded Reload
	sub	w8, w8, w9
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	sub	w24, w21, w9
Lloh15:
	adrp	x21, _TCON_GCTL@GOTPAGE
Lloh16:
	ldr	x21, [x21, _TCON_GCTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_TCON_WRITE
Lloh17:
	adrp	x8, _TCON1_CTL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TCON1_CTL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_TCON_WRITE
Lloh20:
	adrp	x8, _TCON0_DCLK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TCON0_DCLK@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _DCLK_EN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DCLK_EN@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_TCON_WRITE
Lloh26:
	adrp	x8, _TCON1_IO_TRI@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TCON1_IO_TRI@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _IO_TRI_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IO_TRI_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_TCON_WRITE
	ldr	w1, [x21]
Lloh32:
	adrp	x8, _GCTL_IO_MAP_SEL_TCON1@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GCTL_IO_MAP_SEL_TCON1@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_TCON_WRITE
Lloh35:
	adrp	x8, _TCON1_BASIC0@GOTPAGE
Lloh36:
	ldr	x8, [x8, _TCON1_BASIC0@GOTPAGEOFF]
Lloh37:
	ldr	w25, [x8]
	ldr	w26, [sp, #32]                  ; 4-byte Folded Reload
	mov	x0, x26
	bl	_BASIC_X
	mov	x22, x0
	mov	x21, x28
	mov	x0, x28
	bl	_BASIC_Y
	orr	w2, w0, w22
	mov	x0, x19
	mov	x1, x25
	bl	_TCON_WRITE
Lloh38:
	adrp	x8, _TCON1_BASIC1@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TCON1_BASIC1@GOTPAGEOFF]
Lloh40:
	ldr	w22, [x8]
	mov	x0, x26
	bl	_BASIC_X
	mov	x28, x0
	mov	x0, x21
	bl	_BASIC_Y
	orr	w2, w0, w28
	mov	x0, x19
	mov	x1, x22
	bl	_TCON_WRITE
Lloh41:
	adrp	x8, _TCON1_BASIC2@GOTPAGE
Lloh42:
	ldr	x8, [x8, _TCON1_BASIC2@GOTPAGEOFF]
Lloh43:
	ldr	w22, [x8]
	mov	x0, x26
	bl	_BASIC_X
	mov	x26, x0
	mov	x0, x21
	bl	_BASIC_Y
	orr	w2, w0, w26
	mov	x0, x19
	mov	x1, x22
	bl	_TCON_WRITE
Lloh44:
	adrp	x8, _TCON1_BASIC3@GOTPAGE
Lloh45:
	ldr	x8, [x8, _TCON1_BASIC3@GOTPAGEOFF]
Lloh46:
	ldr	w22, [x8]
	ldr	w0, [x20, #20]
	bl	_BASIC3_HT
	mov	x25, x0
	mov	x0, x23
	bl	_BASIC3_HBP
	orr	w2, w0, w25
	mov	x0, x19
	mov	x1, x22
	bl	_TCON_WRITE
	ldr	w0, [x20, #32]
	bl	_VTOTAL
	mov	x25, x0
	ldr	w26, [sp, #36]                  ; 4-byte Folded Reload
	cbz	w26, LBB0_10
; %bb.9:
	ldr	w0, [x20, #36]
	bl	_DOT_CLOCK_TO_HZ
	ldr	w1, [x20, #20]
	bl	_DIVIDE
	ldr	w1, [x20, #32]
	bl	_DIVIDE
	mov	x22, x0
	ldr	w21, [x20, #20]
	ldr	w0, [x20, #32]
	bl	_VTOTAL
	mul	w8, w21, w22
	madd	w8, w8, w0, w8
	cmp	w8, #0
	cinc	w21, w8, lt
	ldr	w0, [x20, #36]
	bl	_DOT_CLOCK_TO_HZ
	cmp	w0, w21, asr #1
	cinc	w25, w25, eq
LBB0_10:
Lloh47:
	adrp	x8, _TCON1_BASIC4@GOTPAGE
Lloh48:
	ldr	x8, [x8, _TCON1_BASIC4@GOTPAGEOFF]
Lloh49:
	ldr	w22, [x8]
	mov	x0, x25
	bl	_BASIC4_VT
	mov	x25, x0
	mov	x0, x24
	bl	_BASIC4_VBP
	orr	w2, w0, w25
	mov	x0, x19
	mov	x1, x22
	bl	_TCON_WRITE
Lloh50:
	adrp	x8, _TCON1_BASIC5@GOTPAGE
Lloh51:
	ldr	x8, [x8, _TCON1_BASIC5@GOTPAGEOFF]
Lloh52:
	ldr	w22, [x8]
	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload
	bl	_BASIC5_HSPW
	mov	x23, x0
	ldr	w0, [sp, #28]                   ; 4-byte Folded Reload
	bl	_BASIC5_VSPW
	orr	w2, w0, w23
	mov	x0, x19
	mov	x1, x22
	bl	_TCON_WRITE
Lloh53:
	adrp	x8, _IO_POL_IO2_INV@GOTPAGE
Lloh54:
	ldr	x8, [x8, _IO_POL_IO2_INV@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	ldr	w9, [x20]
Lloh56:
	adrp	x10, _VID_PHSYNC@GOTPAGE
Lloh57:
	ldr	x10, [x10, _VID_PHSYNC@GOTPAGEOFF]
Lloh58:
	ldr	w10, [x10]
Lloh59:
	adrp	x11, _IO_POL_PHSYNC@GOTPAGE
Lloh60:
	ldr	x11, [x11, _IO_POL_PHSYNC@GOTPAGEOFF]
Lloh61:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w10, w8
Lloh62:
	adrp	x10, _VID_PVSYNC@GOTPAGE
Lloh63:
	ldr	x10, [x10, _VID_PVSYNC@GOTPAGEOFF]
Lloh64:
	ldr	w10, [x10]
Lloh65:
	adrp	x11, _IO_POL_PVSYNC@GOTPAGE
Lloh66:
	ldr	x11, [x11, _IO_POL_PVSYNC@GOTPAGEOFF]
Lloh67:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w2, w8, w9
Lloh68:
	adrp	x8, _TCON1_IO_POL@GOTPAGE
Lloh69:
	ldr	x8, [x8, _TCON1_IO_POL@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_TCON_WRITE
Lloh71:
	adrp	x8, _TCON_GINT1@GOTPAGE
Lloh72:
	ldr	x8, [x8, _TCON_GINT1@GOTPAGEOFF]
Lloh73:
	ldr	w22, [x8]
	mov	x0, x27
	bl	_GINT1_TCON1_LINENO
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_TCON_WRITE
Lloh74:
	adrp	x8, _TCON1_EN@GOTPAGE
Lloh75:
	ldr	x8, [x8, _TCON1_EN@GOTPAGEOFF]
Lloh76:
	ldr	w8, [x8]
Lloh77:
	adrp	x9, _INTERLACE_EN@GOTPAGE
Lloh78:
	ldr	x9, [x9, _INTERLACE_EN@GOTPAGEOFF]
Lloh79:
	ldr	w9, [x9]
	cmp	w26, #0
	csel	w9, w9, wzr, ne
	orr	w21, w9, w8
	mov	x0, x27
	bl	_TCON1_START_DELAY
	orr	w21, w21, w0
Lloh80:
	adrp	x8, _TCON1_SRC_CH1@GOTPAGE
Lloh81:
	ldr	x8, [x8, _TCON1_SRC_CH1@GOTPAGEOFF]
Lloh82:
	ldr	w0, [x8]
	bl	_TCON1_SRC_SEL
	orr	w2, w21, w0
Lloh83:
	adrp	x8, _TCON1_CTL@GOTPAGE
Lloh84:
	ldr	x8, [x8, _TCON1_CTL@GOTPAGEOFF]
Lloh85:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_TCON_WRITE
	ldr	w0, [x20, #36]
	bl	_DOT_CLOCK_TO_HZ
	mov	x1, x0
	mov	x0, x19
	bl	_a10fb_setup_pll
	mov	x22, x0
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_VID_INTERLACE,4,2              ; @VID_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lcd"

l_.str.1:                               ; @.str.1
	.asciz	"cannot find reset 'lcd'\n"

l_.str.2:                               ; @.str.2
	.asciz	"couldn't de-assert reset 'lcd'\n"

l_.str.3:                               ; @.str.3
	.asciz	"ahb_lcd"

l_.str.4:                               ; @.str.4
	.asciz	"cannot find clk 'ahb_lcd'\n"

l_.str.5:                               ; @.str.5
	.asciz	"cannot enable clk 'ahb_lcd'\n"

	.comm	_TCON_GCTL,4,2                  ; @TCON_GCTL
	.comm	_TCON1_CTL,4,2                  ; @TCON1_CTL
	.comm	_TCON0_DCLK,4,2                 ; @TCON0_DCLK
	.comm	_DCLK_EN,4,2                    ; @DCLK_EN
	.comm	_TCON1_IO_TRI,4,2               ; @TCON1_IO_TRI
	.comm	_IO_TRI_MASK,4,2                ; @IO_TRI_MASK
	.comm	_GCTL_IO_MAP_SEL_TCON1,4,2      ; @GCTL_IO_MAP_SEL_TCON1
	.comm	_TCON1_BASIC0,4,2               ; @TCON1_BASIC0
	.comm	_TCON1_BASIC1,4,2               ; @TCON1_BASIC1
	.comm	_TCON1_BASIC2,4,2               ; @TCON1_BASIC2
	.comm	_TCON1_BASIC3,4,2               ; @TCON1_BASIC3
	.comm	_TCON1_BASIC4,4,2               ; @TCON1_BASIC4
	.comm	_TCON1_BASIC5,4,2               ; @TCON1_BASIC5
	.comm	_IO_POL_IO2_INV,4,2             ; @IO_POL_IO2_INV
	.comm	_VID_PHSYNC,4,2                 ; @VID_PHSYNC
	.comm	_IO_POL_PHSYNC,4,2              ; @IO_POL_PHSYNC
	.comm	_VID_PVSYNC,4,2                 ; @VID_PVSYNC
	.comm	_IO_POL_PVSYNC,4,2              ; @IO_POL_PVSYNC
	.comm	_TCON1_IO_POL,4,2               ; @TCON1_IO_POL
	.comm	_TCON_GINT1,4,2                 ; @TCON_GINT1
	.comm	_TCON1_EN,4,2                   ; @TCON1_EN
	.comm	_INTERLACE_EN,4,2               ; @INTERLACE_EN
	.comm	_TCON1_SRC_CH1,4,2              ; @TCON1_SRC_CH1
	.no_dead_strip	_a10fb_setup_tcon
.subsections_via_symbols
