	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_tcon1_mode_set
_sun4i_tcon1_mode_set:                  ## @sun4i_tcon1_mode_set
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_WARN_ON
	movl	4(%rbx), %edi
	imull	$1000, (%r14), %esi             ## imm = 0x3E8
	callq	_clk_set_rate
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_sun4i_tcon_get_clk_delay
	movl	(%rbx), %r15d
	movq	_SUN4I_TCON1_CTL_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movq	_SUN4I_TCON1_CTL_CLK_DELAY_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	movl	%eax, %edi
	callq	_SUN4I_TCON1_CTL_CLK_DELAY
	movl	%r15d, %edi
	movl	%r12d, %esi
	movq	%r13, %rdx
	movq	%rax, %rcx
	callq	_regmap_update_bits
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	4(%r14), %eax
	movq	_SUN4I_TCON1_CTL_INTERLACE_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmovneq	%rdx, %rcx
	movl	(%rbx), %edi
	movq	_SUN4I_TCON1_CTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_update_bits
	movl	(%rbx), %r15d
	movq	%rbx, %r13
	movq	_SUN4I_TCON1_BASIC0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	44(%r14), %edi
	callq	_SUN4I_TCON1_BASIC0_X
	movl	%eax, %ebx
	movl	40(%r14), %edi
	callq	_SUN4I_TCON1_BASIC0_Y
	orl	%eax, %ebx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	(%r13), %r15d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_SUN4I_TCON1_BASIC1_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	44(%r14), %edi
	callq	_SUN4I_TCON1_BASIC1_X
	movl	%eax, %ebx
	movl	40(%r14), %edi
	callq	_SUN4I_TCON1_BASIC1_Y
	orl	%eax, %ebx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	(%r13), %r15d
	movq	_SUN4I_TCON1_BASIC2_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	44(%r14), %edi
	callq	_SUN4I_TCON1_BASIC2_X
	movl	%eax, %ebx
	movl	40(%r14), %edi
	callq	_SUN4I_TCON1_BASIC2_Y
	orl	%eax, %ebx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	8(%r14), %r13d
	movl	16(%r14), %esi
	subl	12(%r14), %r13d
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %edx
	callq	_DRM_DEBUG_DRIVER
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SUN4I_TCON1_BASIC3_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	8(%r14), %edi
	callq	_SUN4I_TCON1_BASIC3_H_TOTAL
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_SUN4I_TCON1_BASIC3_H_BACKPORCH
	orl	%eax, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	20(%r14), %esi
	movl	%esi, %r13d
	subl	24(%r14), %r13d
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %edx
	callq	_DRM_DEBUG_DRIVER
	movl	28(%r14), %edi
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r14), %eax
	sete	%cl
	shll	%cl, %edi
	movl	(%r15), %r15d
	movq	_SUN4I_TCON1_BASIC4_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	callq	_SUN4I_TCON1_BASIC4_V_TOTAL
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_SUN4I_TCON1_BASIC4_V_BACKPORCH
	orl	%eax, %ebx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	32(%r14), %r15d
	movl	36(%r14), %ebx
	subl	12(%r14), %r15d
	subl	24(%r14), %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_DRM_DEBUG_DRIVER
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %r14d
	movq	_SUN4I_TCON1_BASIC5_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%ebx, %edi
	callq	_SUN4I_TCON1_BASIC5_V_SYNC
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_SUN4I_TCON1_BASIC5_H_SYNC
	orl	%eax, %ebx
	movl	%r14d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	(%r13), %edi
	movq	_SUN4I_TCON_GCTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SUN4I_TCON_GCTL_IOMAP_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_SUN4I_TCON_GCTL_IOMAP_TCON1@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN4I_TCON1_CTL_REG,4,2        ## @SUN4I_TCON1_CTL_REG
	.comm	_SUN4I_TCON1_CTL_CLK_DELAY_MASK,8,3 ## @SUN4I_TCON1_CTL_CLK_DELAY_MASK
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_SUN4I_TCON1_CTL_INTERLACE_ENABLE,8,3 ## @SUN4I_TCON1_CTL_INTERLACE_ENABLE
	.comm	_SUN4I_TCON1_BASIC0_REG,4,2     ## @SUN4I_TCON1_BASIC0_REG
	.comm	_SUN4I_TCON1_BASIC1_REG,4,2     ## @SUN4I_TCON1_BASIC1_REG
	.comm	_SUN4I_TCON1_BASIC2_REG,4,2     ## @SUN4I_TCON1_BASIC2_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting horizontal total %d, backporch %d\n"

	.comm	_SUN4I_TCON1_BASIC3_REG,4,2     ## @SUN4I_TCON1_BASIC3_REG
L_.str.1:                               ## @.str.1
	.asciz	"Setting vertical total %d, backporch %d\n"

	.comm	_SUN4I_TCON1_BASIC4_REG,4,2     ## @SUN4I_TCON1_BASIC4_REG
L_.str.2:                               ## @.str.2
	.asciz	"Setting HSYNC %d, VSYNC %d\n"

	.comm	_SUN4I_TCON1_BASIC5_REG,4,2     ## @SUN4I_TCON1_BASIC5_REG
	.comm	_SUN4I_TCON_GCTL_REG,4,2        ## @SUN4I_TCON_GCTL_REG
	.comm	_SUN4I_TCON_GCTL_IOMAP_MASK,8,3 ## @SUN4I_TCON_GCTL_IOMAP_MASK
	.comm	_SUN4I_TCON_GCTL_IOMAP_TCON1,8,3 ## @SUN4I_TCON_GCTL_IOMAP_TCON1
	.no_dead_strip	_sun4i_tcon1_mode_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_tcon1_mode_set
_sun4i_tcon1_mode_set:                  ; @sun4i_tcon1_mode_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w0, [x19, #4]
	ldr	w8, [x20]
	mov	w9, #1000
	mul	w1, w8, w9
	bl	_clk_set_rate
	mov	x0, x20
	mov	w1, #1
	bl	_sun4i_tcon_get_clk_delay
	ldr	w21, [x19]
Lloh0:
	adrp	x24, _SUN4I_TCON1_CTL_REG@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SUN4I_TCON1_CTL_REG@GOTPAGEOFF]
	ldr	w22, [x24]
Lloh2:
	adrp	x8, _SUN4I_TCON1_CTL_CLK_DELAY_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SUN4I_TCON1_CTL_CLK_DELAY_MASK@GOTPAGEOFF]
Lloh4:
	ldr	x23, [x8]
	bl	_SUN4I_TCON1_CTL_CLK_DELAY
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_regmap_update_bits
	ldr	w8, [x20, #4]
Lloh5:
	adrp	x25, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh7:
	adrp	x9, _SUN4I_TCON1_CTL_INTERLACE_ENABLE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SUN4I_TCON1_CTL_INTERLACE_ENABLE@GOTPAGEOFF]
	ldr	w10, [x25]
Lloh9:
	ldr	x2, [x9]
	tst	w10, w8
	csel	x3, xzr, x2, eq
	ldr	w0, [x19]
	ldr	w1, [x24]
	bl	_regmap_update_bits
	ldr	w21, [x19]
Lloh10:
	adrp	x8, _SUN4I_TCON1_BASIC0_REG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SUN4I_TCON1_BASIC0_REG@GOTPAGEOFF]
Lloh12:
	ldr	w22, [x8]
	ldr	w0, [x20, #44]
	bl	_SUN4I_TCON1_BASIC0_X
	mov	x23, x0
	ldr	w0, [x20, #40]
	bl	_SUN4I_TCON1_BASIC0_Y
	orr	w2, w0, w23
	mov	x0, x21
	mov	x1, x22
	bl	_regmap_write
	ldr	w21, [x19]
Lloh13:
	adrp	x8, _SUN4I_TCON1_BASIC1_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SUN4I_TCON1_BASIC1_REG@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	ldr	w0, [x20, #44]
	bl	_SUN4I_TCON1_BASIC1_X
	mov	x23, x0
	ldr	w0, [x20, #40]
	bl	_SUN4I_TCON1_BASIC1_Y
	orr	w2, w0, w23
	mov	x0, x21
	mov	x1, x22
	bl	_regmap_write
	ldr	w21, [x19]
Lloh16:
	adrp	x8, _SUN4I_TCON1_BASIC2_REG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SUN4I_TCON1_BASIC2_REG@GOTPAGEOFF]
Lloh18:
	ldr	w22, [x8]
	ldr	w0, [x20, #44]
	bl	_SUN4I_TCON1_BASIC2_X
	mov	x23, x0
	ldr	w0, [x20, #40]
	bl	_SUN4I_TCON1_BASIC2_Y
	orr	w2, w0, w23
	mov	x0, x21
	mov	x1, x22
	bl	_regmap_write
	ldp	w8, w9, [x20, #8]
	sub	w21, w8, w9
	ldr	w1, [x20, #16]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEBUG_DRIVER
	ldr	w22, [x19]
Lloh21:
	adrp	x8, _SUN4I_TCON1_BASIC3_REG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SUN4I_TCON1_BASIC3_REG@GOTPAGEOFF]
Lloh23:
	ldr	w23, [x8]
	ldr	w0, [x20, #8]
	bl	_SUN4I_TCON1_BASIC3_H_TOTAL
	mov	x24, x0
	mov	x0, x21
	bl	_SUN4I_TCON1_BASIC3_H_BACKPORCH
	orr	w2, w0, w24
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
	ldp	w1, w8, [x20, #20]
	sub	w21, w1, w8
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEBUG_DRIVER
	ldr	w8, [x20, #28]
	ldr	w9, [x20, #4]
	ldr	w10, [x25]
	tst	w10, w9
	cset	w9, eq
	lsl	w0, w8, w9
	ldr	w22, [x19]
Lloh26:
	adrp	x8, _SUN4I_TCON1_BASIC4_REG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SUN4I_TCON1_BASIC4_REG@GOTPAGEOFF]
Lloh28:
	ldr	w23, [x8]
	bl	_SUN4I_TCON1_BASIC4_V_TOTAL
	mov	x24, x0
	mov	x0, x21
	bl	_SUN4I_TCON1_BASIC4_V_BACKPORCH
	orr	w2, w0, w24
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
	ldr	w8, [x20, #12]
	ldp	w9, w10, [x20, #32]
	sub	w21, w9, w8
	ldr	w8, [x20, #24]
	sub	w20, w10, w8
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	bl	_DRM_DEBUG_DRIVER
	ldr	w22, [x19]
Lloh31:
	adrp	x8, _SUN4I_TCON1_BASIC5_REG@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SUN4I_TCON1_BASIC5_REG@GOTPAGEOFF]
Lloh33:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_SUN4I_TCON1_BASIC5_V_SYNC
	mov	x20, x0
	mov	x0, x21
	bl	_SUN4I_TCON1_BASIC5_H_SYNC
	orr	w2, w0, w20
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
Lloh34:
	adrp	x8, _SUN4I_TCON_GCTL_REG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SUN4I_TCON_GCTL_REG@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x8, _SUN4I_TCON_GCTL_IOMAP_MASK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SUN4I_TCON_GCTL_IOMAP_MASK@GOTPAGEOFF]
Lloh39:
	adrp	x9, _SUN4I_TCON_GCTL_IOMAP_TCON1@GOTPAGE
Lloh40:
	ldr	x9, [x9, _SUN4I_TCON_GCTL_IOMAP_TCON1@GOTPAGEOFF]
Lloh41:
	ldr	x2, [x8]
Lloh42:
	ldr	x3, [x9]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_regmap_update_bits
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh41
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_TCON1_CTL_REG,4,2        ; @SUN4I_TCON1_CTL_REG
	.comm	_SUN4I_TCON1_CTL_CLK_DELAY_MASK,8,3 ; @SUN4I_TCON1_CTL_CLK_DELAY_MASK
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_SUN4I_TCON1_CTL_INTERLACE_ENABLE,8,3 ; @SUN4I_TCON1_CTL_INTERLACE_ENABLE
	.comm	_SUN4I_TCON1_BASIC0_REG,4,2     ; @SUN4I_TCON1_BASIC0_REG
	.comm	_SUN4I_TCON1_BASIC1_REG,4,2     ; @SUN4I_TCON1_BASIC1_REG
	.comm	_SUN4I_TCON1_BASIC2_REG,4,2     ; @SUN4I_TCON1_BASIC2_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting horizontal total %d, backporch %d\n"

	.comm	_SUN4I_TCON1_BASIC3_REG,4,2     ; @SUN4I_TCON1_BASIC3_REG
l_.str.1:                               ; @.str.1
	.asciz	"Setting vertical total %d, backporch %d\n"

	.comm	_SUN4I_TCON1_BASIC4_REG,4,2     ; @SUN4I_TCON1_BASIC4_REG
l_.str.2:                               ; @.str.2
	.asciz	"Setting HSYNC %d, VSYNC %d\n"

	.comm	_SUN4I_TCON1_BASIC5_REG,4,2     ; @SUN4I_TCON1_BASIC5_REG
	.comm	_SUN4I_TCON_GCTL_REG,4,2        ; @SUN4I_TCON_GCTL_REG
	.comm	_SUN4I_TCON_GCTL_IOMAP_MASK,8,3 ; @SUN4I_TCON_GCTL_IOMAP_MASK
	.comm	_SUN4I_TCON_GCTL_IOMAP_TCON1,8,3 ; @SUN4I_TCON_GCTL_IOMAP_TCON1
	.no_dead_strip	_sun4i_tcon1_mode_set
.subsections_via_symbols
