	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_gfx_crtc_mode_set_nofb
_aspeed_gfx_crtc_mode_set_nofb:         ## @aspeed_gfx_crtc_mode_set_nofb
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	leaq	-36(%rbp), %rsi
	callq	_aspeed_gfx_set_pixel_fmt
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_CRT_CTRL1@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_CRT_CTRL_INTERLACED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CRT_CTRL_HSYNC_NEGATIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %esi
	orl	%edx, %esi
	movq	_CRT_CTRL_VSYNC_NEGATIVE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r8d
	orl	%r8d, %esi
	notl	%esi
	andl	%eax, %esi
	movl	4(%r15), %eax
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	andl	%eax, %ebx
	cmovnel	%edx, %ebx
	orl	%esi, %ebx
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rdx
	xorl	%edi, %edi
	movl	(%rdx), %edx
	andl	%eax, %edx
	cmovnel	%edi, %ecx
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	cmovel	%r8d, %edi
	orl	%ecx, %edi
	orl	%ebx, %edi
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	56(%r15), %rdi
	decq	%rdi
	callq	_CRT_H_TOTAL
	movl	%eax, %ebx
	movl	8(%r15), %edi
	decl	%edi
	callq	_CRT_H_DE
	orl	%eax, %ebx
	movq	_CRT_HORIZ0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	48(%r15), %rdi
	decq	%rdi
	callq	_CRT_H_RS_START
	movl	%eax, %ebx
	movl	40(%r15), %edi
	callq	_CRT_H_RS_END
	orl	%eax, %ebx
	movq	_CRT_HORIZ1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	32(%r15), %rdi
	decq	%rdi
	callq	_CRT_V_TOTAL
	movl	%eax, %ebx
	movq	24(%r15), %rdi
	decq	%rdi
	callq	_CRT_V_DE
	orl	%eax, %ebx
	movq	_CRT_VERT0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movl	16(%r15), %edi
	callq	_CRT_V_RS_START
	movl	%eax, %ebx
	movl	12(%r15), %edi
	callq	_CRT_V_RS_END
	orl	%eax, %ebx
	movq	_CRT_VERT1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movl	-36(%rbp), %ebx
	imull	8(%r15), %ebx
	leal	7(%rbx), %edi
	testl	%ebx, %ebx
	cmovnsl	%ebx, %edi
	sarl	$3, %edi
	leal	127(%rbx), %eax
	addl	$254, %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$7, %ebx
	callq	_CRT_DISP_OFFSET
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_CRT_TERM_COUNT
	orl	%eax, %r15d
	movq	_CRT_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	_G5_CRT_THROD_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CRT_THROD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CRT_CTRL1,8,3                  ## @CRT_CTRL1
	.comm	_CRT_CTRL_INTERLACED,4,2        ## @CRT_CTRL_INTERLACED
	.comm	_CRT_CTRL_HSYNC_NEGATIVE,4,2    ## @CRT_CTRL_HSYNC_NEGATIVE
	.comm	_CRT_CTRL_VSYNC_NEGATIVE,4,2    ## @CRT_CTRL_VSYNC_NEGATIVE
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_CRT_HORIZ0,8,3                 ## @CRT_HORIZ0
	.comm	_CRT_HORIZ1,8,3                 ## @CRT_HORIZ1
	.comm	_CRT_VERT0,8,3                  ## @CRT_VERT0
	.comm	_CRT_VERT1,8,3                  ## @CRT_VERT1
	.comm	_CRT_OFFSET,8,3                 ## @CRT_OFFSET
	.comm	_G5_CRT_THROD_VAL,4,2           ## @G5_CRT_THROD_VAL
	.comm	_CRT_THROD,8,3                  ## @CRT_THROD
	.no_dead_strip	_aspeed_gfx_crtc_mode_set_nofb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_gfx_crtc_mode_set_nofb
_aspeed_gfx_crtc_mode_set_nofb:         ; @aspeed_gfx_crtc_mode_set_nofb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x21, [x0, #16]
	add	x1, sp, #12
	bl	_aspeed_gfx_set_pixel_fmt
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x20, _CRT_CTRL1@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CRT_CTRL1@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _CRT_CTRL_INTERLACED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CRT_CTRL_INTERLACED@GOTPAGEOFF]
Lloh4:
	adrp	x9, _CRT_CTRL_HSYNC_NEGATIVE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CRT_CTRL_HSYNC_NEGATIVE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	orr	w10, w9, w8
Lloh8:
	adrp	x11, _CRT_CTRL_VSYNC_NEGATIVE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _CRT_CTRL_VSYNC_NEGATIVE@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	orr	w10, w10, w11
	bic	w10, w0, w10
	ldr	w12, [x21, #4]
Lloh11:
	adrp	x13, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh12:
	ldr	x13, [x13, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh13:
	ldr	w13, [x13]
	tst	w13, w12
	csel	w8, wzr, w8, eq
	orr	w8, w8, w10
Lloh14:
	adrp	x10, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh15:
	ldr	x10, [x10, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	tst	w10, w12
	csel	w9, w9, wzr, eq
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w12
	csel	w9, w11, wzr, eq
	orr	w0, w8, w9
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x21, #56]
	sub	x0, x8, #1
	bl	_CRT_H_TOTAL
	mov	x20, x0
	ldr	w8, [x21, #8]
	sub	w0, w8, #1
	bl	_CRT_H_DE
	orr	w0, w0, w20
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _CRT_HORIZ0@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CRT_HORIZ0@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x21, #48]
	sub	x0, x8, #1
	bl	_CRT_H_RS_START
	mov	x20, x0
	ldr	w0, [x21, #40]
	bl	_CRT_H_RS_END
	orr	w0, w0, w20
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _CRT_HORIZ1@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CRT_HORIZ1@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x21, #32]
	sub	x0, x8, #1
	bl	_CRT_V_TOTAL
	mov	x20, x0
	ldr	x8, [x21, #24]
	sub	x0, x8, #1
	bl	_CRT_V_DE
	orr	w0, w0, w20
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _CRT_VERT0@GOTPAGE
Lloh27:
	ldr	x9, [x9, _CRT_VERT0@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x21, #16]
	bl	_CRT_V_RS_START
	mov	x20, x0
	ldr	w0, [x21, #12]
	bl	_CRT_V_RS_END
	orr	w0, w0, w20
	ldr	x8, [x19]
Lloh29:
	adrp	x9, _CRT_VERT1@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CRT_VERT1@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x21, #8]
	ldr	w9, [sp, #12]
	mul	w8, w9, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w0, w9, #3
	add	w9, w8, #127
	add	w8, w8, #254
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w20, w8, #7
	bl	_CRT_DISP_OFFSET
	mov	x21, x0
	mov	x0, x20
	bl	_CRT_TERM_COUNT
	orr	w0, w0, w21
	ldr	x8, [x19]
Lloh32:
	adrp	x9, _CRT_OFFSET@GOTPAGE
Lloh33:
	ldr	x9, [x9, _CRT_OFFSET@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh35:
	adrp	x8, _G5_CRT_THROD_VAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _G5_CRT_THROD_VAL@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh38:
	adrp	x9, _CRT_THROD@GOTPAGE
Lloh39:
	ldr	x9, [x9, _CRT_THROD@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.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 AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CRT_CTRL1,8,3                  ; @CRT_CTRL1
	.comm	_CRT_CTRL_INTERLACED,4,2        ; @CRT_CTRL_INTERLACED
	.comm	_CRT_CTRL_HSYNC_NEGATIVE,4,2    ; @CRT_CTRL_HSYNC_NEGATIVE
	.comm	_CRT_CTRL_VSYNC_NEGATIVE,4,2    ; @CRT_CTRL_VSYNC_NEGATIVE
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_CRT_HORIZ0,8,3                 ; @CRT_HORIZ0
	.comm	_CRT_HORIZ1,8,3                 ; @CRT_HORIZ1
	.comm	_CRT_VERT0,8,3                  ; @CRT_VERT0
	.comm	_CRT_VERT1,8,3                  ; @CRT_VERT1
	.comm	_CRT_OFFSET,8,3                 ; @CRT_OFFSET
	.comm	_G5_CRT_THROD_VAL,4,2           ; @G5_CRT_THROD_VAL
	.comm	_CRT_THROD,8,3                  ; @CRT_THROD
	.no_dead_strip	_aspeed_gfx_crtc_mode_set_nofb
.subsections_via_symbols
