	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tilcdc_crtc_set_mode
_tilcdc_crtc_set_mode:                  ## @tilcdc_crtc_set_mode
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_to_tilcdc_crtc
	movq	%rax, %r14
	movq	56(%r12), %rbx
	movq	8(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %r15
	movq	40(%r12), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	48(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_46
## %bb.1:
	xorl	%edi, %edi
	testq	%r13, %r13
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_46
## %bb.2:
	movq	_LCDC_DMA_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_tilcdc_read
	movq	%r15, %rcx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %ecx
	decl	%ecx
	cmpl	$15, %ecx
	ja	LBB0_7
## %bb.3:
	movl	%eax, %r15d
	movq	_LCDC_DMA_BURST_1@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_8:
	movq	_LCDC_DMA_BURST_2@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_28
LBB0_4:
	movq	_LCDC_DMA_BURST_4@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movq	_LCDC_DMA_BURST_8@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_LCDC_DMA_BURST_16@GOTPCREL(%rip), %rax
LBB0_9:
	movq	%r13, -128(%rbp)                ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	andl	$-1905, %r15d                   ## imm = 0xF88F
	movl	(%rax), %edi
	callq	_LCDC_DMA_BURST_SIZE
	orl	%eax, %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edx
	shll	$8, %edx
	orl	%r15d, %edx
	movq	_LCDC_DMA_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_tilcdc_write
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	4(%rax), %r9d
	subl	%r9d, %ecx
	movl	8(%rax), %r13d
	movl	12(%rax), %esi
	subl	%r13d, %r9d
	subl	%esi, %r13d
	movl	16(%rax), %r10d
	movl	20(%rax), %r11d
	subl	%r11d, %r10d
	movl	24(%rax), %ebx
	movl	28(%rax), %edx
	subl	%ebx, %r11d
	subl	%edx, %ebx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdi
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r13d, %r8d
	movl	%r9d, -68(%rbp)                 ## 4-byte Spill
	movq	%r11, -120(%rbp)                ## 8-byte Spill
	pushq	%r11
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	pushq	%rbx
	movq	%r10, -112(%rbp)                ## 8-byte Spill
	pushq	%r10
	callq	_DBG
	addq	$32, %rsp
	movq	_LCDC_RASTER_TIMING_2_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_tilcdc_read
	movl	%eax, %ebx
	andl	$-1048321, %ebx                 ## imm = 0xFFF000FF
	movl	60(%r14), %edi
	callq	_LCDC_AC_BIAS_FREQUENCY
	movl	%eax, %r15d
	movl	56(%r14), %edi
	callq	_LCDC_AC_BIAS_TRANSITIONS_PER_INT
	orl	%ebx, %r15d
	orl	%eax, %r15d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, (%rax)
	jne	LBB0_10
## %bb.11:
	andl	$-2013265972, %r15d             ## imm = 0x87FFFFCC
	leal	-1(%r13), %eax
	shrl	$8, %eax
	andl	$3, %eax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	decl	%ecx
	shrl	$4, %ecx
	andl	$48, %ecx
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	shll	$21, %edx
	addl	$2145386496, %edx               ## imm = 0x7FE00000
	andl	$2013265920, %edx               ## imm = 0x78000000
	orl	%ecx, %edx
	orl	%eax, %edx
	orl	%edx, %r15d
	jmp	LBB0_12
LBB0_10:
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
LBB0_12:
	movq	_LCDC_RASTER_TIMING_2_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_tilcdc_write
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	12(%r15), %eax
	sarl	$4, %eax
	decl	%eax
	movl	%eax, %ecx
	shll	$4, %ecx
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	shll	$24, %esi
	shll	$10, %ebx
	addl	$64512, %ebx                    ## imm = 0xFC00
	movzwl	%bx, %edx
	orl	%esi, %edx
	shll	$16, %r13d
	addl	$16711680, %r13d                ## imm = 0xFF0000
	andl	$16711680, %r13d                ## imm = 0xFF0000
	shrl	$3, %eax
	andl	$8, %eax
	xorl	%esi, %esi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$2, (%rbx)
	cmovnel	%esi, %eax
	addl	%r13d, %edx
	addl	$-16777216, %edx                ## imm = 0xFF000000
	orl	%ecx, %edx
	orl	%eax, %edx
	movq	_LCDC_RASTER_TIMING_0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tilcdc_write
	movl	28(%r15), %eax
	decl	%eax
	andl	$1023, %eax                     ## imm = 0x3FF
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	shll	$24, %ecx
	orl	%eax, %ecx
	movzbl	-104(%rbp), %eax                ## 1-byte Folded Reload
	shll	$16, %eax
	orl	%ecx, %eax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	shll	$10, %ecx
	addl	$64512, %ecx                    ## imm = 0xFC00
	movzwl	%cx, %edx
	orl	%eax, %edx
	movq	_LCDC_RASTER_TIMING_1_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tilcdc_write
	cmpl	$2, (%rbx)
	movq	-128(%rbp), %r13                ## 8-byte Reload
	jne	LBB0_16
## %bb.13:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	28(%rax), %eax
	decl	%eax
	movq	_LCDC_RASTER_TIMING_2_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_LCDC_LPP_B10@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	$1024, %eax                     ## imm = 0x400
	jne	LBB0_14
## %bb.15:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_tilcdc_clear
	jmp	LBB0_16
LBB0_14:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_tilcdc_set
LBB0_16:
	movq	_LCDC_RASTER_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tilcdc_read
	movq	_LCDC_TFT_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_LCDC_MONO_8BIT_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	%ecx, %ebx
	movq	_LCDC_MONOCHROME_MODE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ebx
	movq	_LCDC_V2_TFT_24BPP_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_LCDC_V2_TFT_24BPP_UNPACK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%edx, %edi
	orl	%esi, %edi
	orl	%ebx, %edi
	notl	%edi
	andl	%eax, %edi
	andl	$-1044481, %edi                 ## imm = 0xFFF00FFF
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 48(%rax)
	movl	$0, %eax
	je	LBB0_18
## %bb.17:
	movq	_LCDC_TFT_ALT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	orl	%edi, %ecx
	orl	%eax, %ecx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, (%rax)
	jne	LBB0_19
## %bb.20:
	movq	(%r13), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	ja	LBB0_27
## %bb.21:
	movl	$3, %edi
	btl	%eax, %edi
	jb	LBB0_25
## %bb.22:
	movl	$20, %esi
	btl	%eax, %esi
	jb	LBB0_26
	jmp	LBB0_23
LBB0_19:
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_25:
	orl	%esi, %ecx
LBB0_26:
	orl	%edx, %ecx
LBB0_23:
	xorl	%edx, %edx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpl	$12, 8(%r14)
	setl	%dl
	orl	%ecx, %edx
	movq	_LCDC_RASTER_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tilcdc_write
	cmpq	$0, 40(%r14)
	movq	_LCDC_RASTER_TIMING_2_REG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_LCDC_INVERT_PIXEL_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	je	LBB0_29
## %bb.24:
	callq	_tilcdc_set
	jmp	LBB0_30
LBB0_29:
	callq	_tilcdc_clear
LBB0_30:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 32(%rax)
	movl	(%r14), %esi
	movq	_LCDC_SYNC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	je	LBB0_32
## %bb.31:
	callq	_tilcdc_set
	jmp	LBB0_33
LBB0_32:
	callq	_tilcdc_clear
LBB0_33:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 24(%rax)
	movl	(%r14), %esi
	movq	_LCDC_SYNC_EDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	je	LBB0_35
## %bb.34:
	callq	_tilcdc_set
	jmp	LBB0_36
LBB0_35:
	callq	_tilcdc_clear
LBB0_36:
	movq	_DRM_MODE_FLAG_NHSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r14), %esi
	movq	_LCDC_INVERT_HSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, 32(%rcx)
	je	LBB0_38
## %bb.37:
	movq	%rbx, %rdi
	callq	_tilcdc_set
	jmp	LBB0_39
LBB0_38:
	movq	%rbx, %rdi
	callq	_tilcdc_clear
LBB0_39:
	movq	_DRM_MODE_FLAG_NVSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r14), %esi
	movq	_LCDC_INVERT_VSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, 32(%rcx)
	je	LBB0_41
## %bb.40:
	movq	%rbx, %rdi
	callq	_tilcdc_set
	jmp	LBB0_42
LBB0_41:
	movq	%rbx, %rdi
	callq	_tilcdc_clear
LBB0_42:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 16(%rax)
	movq	_LCDC_RASTER_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LCDC_RASTER_ORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	je	LBB0_44
## %bb.43:
	callq	_tilcdc_set
	jmp	LBB0_45
LBB0_44:
	callq	_tilcdc_clear
LBB0_45:
	movq	%r12, %rdi
	callq	_tilcdc_crtc_set_clk
	movq	%r12, %rdi
	callq	_tilcdc_crtc_load_palette
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_set_scanout
	movq	40(%r12), %rax
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	%xmm0, (%r12)
	movups	%xmm1, 16(%r12)
	movl	32(%rax), %eax
	movl	%eax, 32(%r12)
	movq	%r12, %rdi
	callq	_tilcdc_mode_hvtotal
	movl	%eax, (%r15)
LBB0_46:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_28:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_5
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_LCDC_DMA_CTRL_REG,4,2          ## @LCDC_DMA_CTRL_REG
	.comm	_LCDC_DMA_BURST_1,4,2           ## @LCDC_DMA_BURST_1
	.comm	_LCDC_DMA_BURST_2,4,2           ## @LCDC_DMA_BURST_2
	.comm	_LCDC_DMA_BURST_4,4,2           ## @LCDC_DMA_BURST_4
	.comm	_LCDC_DMA_BURST_8,4,2           ## @LCDC_DMA_BURST_8
	.comm	_LCDC_DMA_BURST_16,4,2          ## @LCDC_DMA_BURST_16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid burst size\n"

L_.str.1:                               ## @.str.1
	.asciz	"%dx%d, hbp=%u, hfp=%u, hsw=%u, vbp=%u, vfp=%u, vsw=%u"

	.comm	_LCDC_RASTER_TIMING_2_REG,4,2   ## @LCDC_RASTER_TIMING_2_REG
	.comm	_LCDC_RASTER_TIMING_0_REG,4,2   ## @LCDC_RASTER_TIMING_0_REG
	.comm	_LCDC_RASTER_TIMING_1_REG,4,2   ## @LCDC_RASTER_TIMING_1_REG
	.comm	_LCDC_LPP_B10,4,2               ## @LCDC_LPP_B10
	.comm	_LCDC_RASTER_CTRL_REG,4,2       ## @LCDC_RASTER_CTRL_REG
	.comm	_LCDC_TFT_MODE,4,2              ## @LCDC_TFT_MODE
	.comm	_LCDC_MONO_8BIT_MODE,4,2        ## @LCDC_MONO_8BIT_MODE
	.comm	_LCDC_MONOCHROME_MODE,4,2       ## @LCDC_MONOCHROME_MODE
	.comm	_LCDC_V2_TFT_24BPP_MODE,4,2     ## @LCDC_V2_TFT_24BPP_MODE
	.comm	_LCDC_V2_TFT_24BPP_UNPACK,4,2   ## @LCDC_V2_TFT_24BPP_UNPACK
	.comm	_LCDC_TFT_ALT_ENABLE,4,2        ## @LCDC_TFT_ALT_ENABLE
L_.str.2:                               ## @.str.2
	.asciz	"invalid pixel format\n"

	.comm	_LCDC_INVERT_PIXEL_CLOCK,4,2    ## @LCDC_INVERT_PIXEL_CLOCK
	.comm	_LCDC_SYNC_CTRL,4,2             ## @LCDC_SYNC_CTRL
	.comm	_LCDC_SYNC_EDGE,4,2             ## @LCDC_SYNC_EDGE
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ## @DRM_MODE_FLAG_NHSYNC
	.comm	_LCDC_INVERT_HSYNC,4,2          ## @LCDC_INVERT_HSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ## @DRM_MODE_FLAG_NVSYNC
	.comm	_LCDC_INVERT_VSYNC,4,2          ## @LCDC_INVERT_VSYNC
	.comm	_LCDC_RASTER_ORDER,4,2          ## @LCDC_RASTER_ORDER
	.no_dead_strip	_tilcdc_crtc_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tilcdc_crtc_set_mode
_tilcdc_crtc_set_mode:                  ; @tilcdc_crtc_set_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
	bl	_to_tilcdc_crtc
	mov	x20, x0
	ldp	x8, x22, [x19, #48]
	ldr	x21, [x22, #8]
	ldr	x23, [x0, #8]
	ldr	x24, [x19, #40]
	ldr	x8, [x8]
	ldr	x26, [x8]
	cmp	x23, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_39
; %bb.1:
	cmp	x26, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_39
; %bb.2:
Lloh0:
	adrp	x25, _LCDC_DMA_CTRL_REG@GOTPAGE
Lloh1:
	ldr	x25, [x25, _LCDC_DMA_CTRL_REG@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x22
	bl	_tilcdc_read
	ldr	w8, [x23]
	sub	w9, w8, #1
	cmp	w9, #15
	b.hi	LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _LCDC_DMA_BURST_1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LCDC_DMA_BURST_1@GOTPAGEOFF]
Lloh4:
	adrp	x10, lJTI0_0@PAGE
Lloh5:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
Lloh6:
	adrp	x8, _LCDC_DMA_BURST_2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LCDC_DMA_BURST_2@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_41
LBB0_6:
Lloh10:
	adrp	x8, _LCDC_DMA_BURST_4@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LCDC_DMA_BURST_4@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _LCDC_DMA_BURST_8@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LCDC_DMA_BURST_8@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh14:
	adrp	x8, _LCDC_DMA_BURST_16@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LCDC_DMA_BURST_16@GOTPAGEOFF]
LBB0_9:
	stp	x26, x20, [sp, #16]             ; 16-byte Folded Spill
	mov	w9, #-1905
	and	w26, w0, w9
	ldr	w0, [x8]
	bl	_LCDC_DMA_BURST_SIZE
	orr	w8, w0, w26
	ldr	w9, [x23, #4]
	orr	w2, w8, w9, lsl #8
	ldr	w1, [x25]
	mov	x0, x22
	bl	_tilcdc_write
	ldp	w8, w9, [x24]
	sub	w25, w8, w9
	ldp	w8, w1, [x24, #8]
	sub	w26, w8, w1
	sub	w27, w9, w8
	ldp	w8, w9, [x24, #16]
	sub	w6, w8, w9
	ldp	w8, w2, [x24, #24]
	sub	w7, w8, w2
	stp	w6, w7, [sp, #4]                ; 8-byte Folded Spill
	sub	w8, w9, w8
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	str	w8, [sp]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x25
	mov	x4, x26
	mov	x5, x27
	bl	_DBG
Lloh18:
	adrp	x8, _LCDC_RASTER_TIMING_2_REG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LCDC_RASTER_TIMING_2_REG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_tilcdc_read
	and	w20, w0, #0xfff000ff
	ldr	w0, [x23, #60]
	bl	_LCDC_AC_BIAS_FREQUENCY
	mov	x28, x0
	ldr	w0, [x23, #56]
	bl	_LCDC_AC_BIAS_TRANSITIONS_PER_INT
	orr	w8, w28, w20
Lloh21:
	adrp	x28, _LCDC_RASTER_TIMING_2_REG@GOTPAGE
Lloh22:
	ldr	x28, [x28, _LCDC_RASTER_TIMING_2_REG@GOTPAGEOFF]
	orr	w8, w8, w0
	ldr	w9, [x21]
	mov	w10, #65484
	movk	w10, #34815, lsl #16
	and	w10, w8, w10
	sub	w11, w26, #1
	sub	w12, w25, #1
	lsr	w12, w12, #4
	and	w12, w12, #0x30
	mov	w13, #2145386496
	add	w13, w13, w27, lsl #21
	and	w13, w13, #0x78000000
	orr	w12, w13, w12
	bfxil	w12, w11, #8, #2
	orr	w10, w12, w10
	cmp	w9, #2
	csel	w2, w8, w10, ne
	ldr	w1, [x28]
	mov	x0, x22
	bl	_tilcdc_write
	ldr	w8, [x24, #12]
	asr	w8, w8, #4
	sub	w8, w8, #1
	mov	w20, #64512
	add	w9, w20, w27, lsl #10
	and	w9, w9, #0xfc00
	bfi	w9, w25, #24, #8
	lsl	w10, w26, #16
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	add	w10, w10, #4080, lsl #12        ; =16711680
	and	w10, w10, #0xff0000
	ldr	w11, [x21]
	lsr	w12, w8, #3
	and	w12, w12, #0x8
	cmp	w11, #2
	csel	w11, w12, wzr, eq
	orr	w9, w9, w10
	mov	w10, #-16777216
	add	w9, w9, w10
	orr	w8, w9, w8, lsl #4
	orr	w2, w8, w11
Lloh23:
	adrp	x8, _LCDC_RASTER_TIMING_0_REG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LCDC_RASTER_TIMING_0_REG@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_tilcdc_write
	ldr	w8, [x24, #28]
	sub	w8, w8, #1
	and	w8, w8, #0x3ff
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	bfi	w8, w9, #24, #8
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	bfi	w8, w9, #16, #8
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	add	w9, w20, w9, lsl #10
	and	w9, w9, #0xfc00
	orr	w2, w8, w9
Lloh26:
	adrp	x8, _LCDC_RASTER_TIMING_1_REG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LCDC_RASTER_TIMING_1_REG@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_tilcdc_write
	ldr	w8, [x21]
	cmp	w8, #2
	b.ne	LBB0_13
; %bb.10:
	ldr	w8, [x24, #28]
	sub	w8, w8, #1
	ldr	w1, [x28]
Lloh29:
	adrp	x9, _LCDC_LPP_B10@GOTPAGE
Lloh30:
	ldr	x9, [x9, _LCDC_LPP_B10@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x9]
	mov	x0, x22
	tbnz	w8, #10, LBB0_12
; %bb.11:
	bl	_tilcdc_clear
	b	LBB0_13
LBB0_12:
	bl	_tilcdc_set
LBB0_13:
Lloh32:
	adrp	x25, _LCDC_RASTER_CTRL_REG@GOTPAGE
Lloh33:
	ldr	x25, [x25, _LCDC_RASTER_CTRL_REG@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x22
	bl	_tilcdc_read
Lloh34:
	adrp	x8, _LCDC_TFT_MODE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LCDC_TFT_MODE@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x8]
Lloh37:
	adrp	x8, _LCDC_MONO_8BIT_MODE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _LCDC_MONO_8BIT_MODE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	orr	w8, w8, w9
Lloh40:
	adrp	x10, _LCDC_MONOCHROME_MODE@GOTPAGE
Lloh41:
	ldr	x10, [x10, _LCDC_MONOCHROME_MODE@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x10]
	orr	w10, w8, w10
Lloh43:
	adrp	x8, _LCDC_V2_TFT_24BPP_MODE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _LCDC_V2_TFT_24BPP_MODE@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	orr	w11, w10, w8
Lloh46:
	adrp	x10, _LCDC_V2_TFT_24BPP_UNPACK@GOTPAGE
Lloh47:
	ldr	x10, [x10, _LCDC_V2_TFT_24BPP_UNPACK@GOTPAGEOFF]
Lloh48:
	ldr	w10, [x10]
	orr	w11, w11, w10
	bic	w11, w0, w11
	and	w11, w11, #0xfff00fff
	ldr	x12, [x23, #48]
Lloh49:
	adrp	x13, _LCDC_TFT_ALT_ENABLE@GOTPAGE
Lloh50:
	ldr	x13, [x13, _LCDC_TFT_ALT_ENABLE@GOTPAGEOFF]
Lloh51:
	ldr	w13, [x13]
	cmp	x12, #0
	csel	w12, wzr, w13, eq
	orr	w9, w12, w9
	orr	w9, w9, w11
	ldr	w11, [x21]
	cmp	w11, #2
	b.ne	LBB0_17
; %bb.14:
	ldr	x11, [x26]
	ldr	w11, [x11]
	sub	w11, w11, #128
	cmp	w11, #5
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
	b.hi	LBB0_40
; %bb.15:
	mov	w12, #1
	lsl	w11, w12, w11
	tst	w11, #0x3
	b.ne	LBB0_18
; %bb.16:
	mov	w10, #20
	tst	w11, w10
	b.ne	LBB0_19
	b	LBB0_20
LBB0_17:
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_20
LBB0_18:
	orr	w9, w9, w10
LBB0_19:
	orr	w9, w9, w8
LBB0_20:
	ldr	w8, [x23, #8]
	cmp	w8, #12
	cset	w8, lt
	orr	w2, w9, w8
	ldr	w1, [x25]
	mov	x0, x22
	bl	_tilcdc_write
	ldr	x8, [x23, #40]
	ldr	w1, [x28]
Lloh52:
	adrp	x9, _LCDC_INVERT_PIXEL_CLOCK@GOTPAGE
Lloh53:
	ldr	x9, [x9, _LCDC_INVERT_PIXEL_CLOCK@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x9]
	mov	x0, x22
	cbz	x8, LBB0_22
; %bb.21:
	bl	_tilcdc_set
	b	LBB0_23
LBB0_22:
	bl	_tilcdc_clear
LBB0_23:
	ldr	x8, [x23, #32]
	ldr	w1, [x28]
Lloh55:
	adrp	x9, _LCDC_SYNC_CTRL@GOTPAGE
Lloh56:
	ldr	x9, [x9, _LCDC_SYNC_CTRL@GOTPAGEOFF]
Lloh57:
	ldr	w2, [x9]
	mov	x0, x22
	cbz	x8, LBB0_25
; %bb.24:
	bl	_tilcdc_set
	b	LBB0_26
LBB0_25:
	bl	_tilcdc_clear
LBB0_26:
	ldr	x8, [x23, #24]
	ldr	w1, [x28]
Lloh58:
	adrp	x9, _LCDC_SYNC_EDGE@GOTPAGE
Lloh59:
	ldr	x9, [x9, _LCDC_SYNC_EDGE@GOTPAGEOFF]
Lloh60:
	ldr	w2, [x9]
	mov	x0, x22
	cbz	x8, LBB0_28
; %bb.27:
	bl	_tilcdc_set
	b	LBB0_29
LBB0_28:
	bl	_tilcdc_clear
LBB0_29:
	ldr	w8, [x24, #32]
Lloh61:
	adrp	x9, _DRM_MODE_FLAG_NHSYNC@GOTPAGE
Lloh62:
	ldr	x9, [x9, _DRM_MODE_FLAG_NHSYNC@GOTPAGEOFF]
Lloh63:
	ldr	w9, [x9]
	ldr	w1, [x28]
Lloh64:
	adrp	x10, _LCDC_INVERT_HSYNC@GOTPAGE
Lloh65:
	ldr	x10, [x10, _LCDC_INVERT_HSYNC@GOTPAGEOFF]
Lloh66:
	ldr	w2, [x10]
	mov	x0, x22
	tst	w9, w8
	b.eq	LBB0_31
; %bb.30:
	bl	_tilcdc_set
	b	LBB0_32
LBB0_31:
	bl	_tilcdc_clear
LBB0_32:
	ldr	w8, [x24, #32]
Lloh67:
	adrp	x9, _DRM_MODE_FLAG_NVSYNC@GOTPAGE
Lloh68:
	ldr	x9, [x9, _DRM_MODE_FLAG_NVSYNC@GOTPAGEOFF]
Lloh69:
	ldr	w9, [x9]
	ldr	w1, [x28]
Lloh70:
	adrp	x10, _LCDC_INVERT_VSYNC@GOTPAGE
Lloh71:
	ldr	x10, [x10, _LCDC_INVERT_VSYNC@GOTPAGEOFF]
Lloh72:
	ldr	w2, [x10]
	mov	x0, x22
	tst	w9, w8
	b.eq	LBB0_34
; %bb.33:
	bl	_tilcdc_set
	b	LBB0_35
LBB0_34:
	bl	_tilcdc_clear
LBB0_35:
	ldr	x8, [x23, #16]
	ldr	w1, [x25]
Lloh73:
	adrp	x9, _LCDC_RASTER_ORDER@GOTPAGE
Lloh74:
	ldr	x9, [x9, _LCDC_RASTER_ORDER@GOTPAGEOFF]
Lloh75:
	ldr	w2, [x9]
	mov	x0, x22
	cbz	x8, LBB0_37
; %bb.36:
	bl	_tilcdc_set
	b	LBB0_38
LBB0_37:
	bl	_tilcdc_clear
LBB0_38:
	mov	x0, x19
	bl	_tilcdc_crtc_set_clk
	mov	x0, x19
	bl	_tilcdc_crtc_load_palette
	mov	x0, x19
	mov	x1, x26
	bl	_set_scanout
	ldr	x8, [x19, #40]
	ldr	w9, [x8, #32]
	ldp	q1, q0, [x8]
	stp	q1, q0, [x19]
	str	w9, [x19, #32]
	mov	x0, x19
	bl	_tilcdc_mode_hvtotal
	str	w0, [x20]
LBB0_39:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_40:
	ldr	w0, [x22]
Lloh76:
	adrp	x1, l_.str.2@PAGE
Lloh77:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_41:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_dev_err
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
                                        ; -- End function
	.comm	_LCDC_DMA_CTRL_REG,4,2          ; @LCDC_DMA_CTRL_REG
	.comm	_LCDC_DMA_BURST_1,4,2           ; @LCDC_DMA_BURST_1
	.comm	_LCDC_DMA_BURST_2,4,2           ; @LCDC_DMA_BURST_2
	.comm	_LCDC_DMA_BURST_4,4,2           ; @LCDC_DMA_BURST_4
	.comm	_LCDC_DMA_BURST_8,4,2           ; @LCDC_DMA_BURST_8
	.comm	_LCDC_DMA_BURST_16,4,2          ; @LCDC_DMA_BURST_16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid burst size\n"

l_.str.1:                               ; @.str.1
	.asciz	"%dx%d, hbp=%u, hfp=%u, hsw=%u, vbp=%u, vfp=%u, vsw=%u"

	.comm	_LCDC_RASTER_TIMING_2_REG,4,2   ; @LCDC_RASTER_TIMING_2_REG
	.comm	_LCDC_RASTER_TIMING_0_REG,4,2   ; @LCDC_RASTER_TIMING_0_REG
	.comm	_LCDC_RASTER_TIMING_1_REG,4,2   ; @LCDC_RASTER_TIMING_1_REG
	.comm	_LCDC_LPP_B10,4,2               ; @LCDC_LPP_B10
	.comm	_LCDC_RASTER_CTRL_REG,4,2       ; @LCDC_RASTER_CTRL_REG
	.comm	_LCDC_TFT_MODE,4,2              ; @LCDC_TFT_MODE
	.comm	_LCDC_MONO_8BIT_MODE,4,2        ; @LCDC_MONO_8BIT_MODE
	.comm	_LCDC_MONOCHROME_MODE,4,2       ; @LCDC_MONOCHROME_MODE
	.comm	_LCDC_V2_TFT_24BPP_MODE,4,2     ; @LCDC_V2_TFT_24BPP_MODE
	.comm	_LCDC_V2_TFT_24BPP_UNPACK,4,2   ; @LCDC_V2_TFT_24BPP_UNPACK
	.comm	_LCDC_TFT_ALT_ENABLE,4,2        ; @LCDC_TFT_ALT_ENABLE
l_.str.2:                               ; @.str.2
	.asciz	"invalid pixel format\n"

	.comm	_LCDC_INVERT_PIXEL_CLOCK,4,2    ; @LCDC_INVERT_PIXEL_CLOCK
	.comm	_LCDC_SYNC_CTRL,4,2             ; @LCDC_SYNC_CTRL
	.comm	_LCDC_SYNC_EDGE,4,2             ; @LCDC_SYNC_EDGE
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ; @DRM_MODE_FLAG_NHSYNC
	.comm	_LCDC_INVERT_HSYNC,4,2          ; @LCDC_INVERT_HSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ; @DRM_MODE_FLAG_NVSYNC
	.comm	_LCDC_INVERT_VSYNC,4,2          ; @LCDC_INVERT_VSYNC
	.comm	_LCDC_RASTER_ORDER,4,2          ; @LCDC_RASTER_ORDER
	.no_dead_strip	_tilcdc_crtc_set_mode
.subsections_via_symbols
