	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_gfx_set_pixel_fmt
_aspeed_gfx_set_pixel_fmt:              ## @aspeed_gfx_set_pixel_fmt
	.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
	pushq	%rax
	.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, %r15
	movq	8(%rdi), %rax
	movq	16(%rdi), %r13
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %ebx
	movq	_CRT_CTRL1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	_CRT_CTRL_COLOR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$129, %ebx
	je	LBB0_1
## %bb.2:
	cmpl	$128, %ebx
	jne	LBB0_6
## %bb.3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_CRT_CTRL_COLOR_XRGB8888@GOTPCREL(%rip), %rbx
	movl	$32, %r14d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_CRT_CTRL_COLOR_RGB565@GOTPCREL(%rip), %rbx
	movl	$16, %r14d
	leaq	L_.str(%rip), %rsi
LBB0_4:
	notl	%eax
	andl	%eax, %r12d
	movl	(%r13), %edi
	callq	_dev_dbg
	orl	(%rbx), %r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
	movq	_CRT_CTRL1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r12d, %edi
	callq	_writel
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_6:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CRT_CTRL1,8,3                  ## @CRT_CTRL1
	.comm	_CRT_CTRL_COLOR_MASK,4,2        ## @CRT_CTRL_COLOR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting up RGB565 mode\n"

	.comm	_CRT_CTRL_COLOR_RGB565,4,2      ## @CRT_CTRL_COLOR_RGB565
L_.str.1:                               ## @.str.1
	.asciz	"Setting up XRGB8888 mode\n"

	.comm	_CRT_CTRL_COLOR_XRGB8888,4,2    ## @CRT_CTRL_COLOR_XRGB8888
L_.str.2:                               ## @.str.2
	.asciz	"Unhandled pixel format %08x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_aspeed_gfx_set_pixel_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_gfx_set_pixel_fmt
_aspeed_gfx_set_pixel_fmt:              ; @aspeed_gfx_set_pixel_fmt
	.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
	ldp	x8, x22, [x0, #8]
	ldr	x9, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w21, [x8]
Lloh0:
	adrp	x23, _CRT_CTRL1@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CRT_CTRL1@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x0, x8, x9
	bl	_readl
Lloh2:
	adrp	x8, _CRT_CTRL_COLOR_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CRT_CTRL_COLOR_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w21, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_5
; %bb.2:
Lloh5:
	adrp	x21, _CRT_CTRL_COLOR_XRGB8888@GOTPAGE
Lloh6:
	ldr	x21, [x21, _CRT_CTRL_COLOR_XRGB8888@GOTPAGEOFF]
	mov	w24, #32
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x21, _CRT_CTRL_COLOR_RGB565@GOTPAGE
Lloh10:
	ldr	x21, [x21, _CRT_CTRL_COLOR_RGB565@GOTPAGEOFF]
	mov	w24, #16
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bic	w25, w0, w8
	ldr	w0, [x22]
	bl	_dev_dbg
	ldr	w8, [x21]
	orr	w0, w8, w25
	str	w24, [x20]
	ldr	x8, [x19]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x22]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CRT_CTRL1,8,3                  ; @CRT_CTRL1
	.comm	_CRT_CTRL_COLOR_MASK,4,2        ; @CRT_CTRL_COLOR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting up RGB565 mode\n"

	.comm	_CRT_CTRL_COLOR_RGB565,4,2      ; @CRT_CTRL_COLOR_RGB565
l_.str.1:                               ; @.str.1
	.asciz	"Setting up XRGB8888 mode\n"

	.comm	_CRT_CTRL_COLOR_XRGB8888,4,2    ; @CRT_CTRL_COLOR_XRGB8888
l_.str.2:                               ; @.str.2
	.asciz	"Unhandled pixel format %08x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_aspeed_gfx_set_pixel_fmt
.subsections_via_symbols
