	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdlcd_set_pxl_fmt
_hdlcd_set_pxl_fmt:                     ## @hdlcd_set_pxl_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	%rdi, %rbx
	callq	_crtc_to_hdlcd_priv
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %r15d
	movq	_supported_formats@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpl	%r15d, 28(%rdi,%rbx)
	leaq	(%rdi,%rbx), %rax
	cmoveq	%rax, %r13
	incq	%r14
	callq	_ARRAY_SIZE
	cltq
	addq	$32, %rbx
	cmpq	%rax, %r14
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r13d, %r13d
LBB0_4:
	xorl	%edi, %edi
	testq	%r13, %r13
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movl	(%r13), %edx
	leal	7(%rdx), %eax
	addl	$14, %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	andl	$-8, %edx
	movq	_HDLCD_REG_PIXEL_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$-8, %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_hdlcd_write
	movq	_HDLCD_REG_RED_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%r13), %edx
	andl	$15, %edx
	shll	$8, %edx
	orl	20(%r13), %edx
	movq	%rbx, %rdi
	callq	_hdlcd_write
	movq	_HDLCD_REG_GREEN_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r13), %edx
	andl	$15, %edx
	shll	$8, %edx
	orl	12(%r13), %edx
	movq	%rbx, %rdi
	callq	_hdlcd_write
	movq	_HDLCD_REG_BLUE_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r13), %edx
	andl	$15, %edx
	shll	$8, %edx
	orl	4(%r13), %edx
	movq	%rbx, %rdi
	callq	_hdlcd_write
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_supported_formats,8,3          ## @supported_formats
	.comm	_HDLCD_REG_PIXEL_FORMAT,4,2     ## @HDLCD_REG_PIXEL_FORMAT
	.comm	_HDLCD_REG_RED_SELECT,4,2       ## @HDLCD_REG_RED_SELECT
	.comm	_HDLCD_REG_GREEN_SELECT,4,2     ## @HDLCD_REG_GREEN_SELECT
	.comm	_HDLCD_REG_BLUE_SELECT,4,2      ## @HDLCD_REG_BLUE_SELECT
	.no_dead_strip	_hdlcd_set_pxl_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdlcd_set_pxl_fmt
_hdlcd_set_pxl_fmt:                     ; @hdlcd_set_pxl_fmt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	bl	_crtc_to_hdlcd_priv
	mov	x19, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w21, [x8]
Lloh0:
	adrp	x22, _supported_formats@GOTPAGE
Lloh1:
	ldr	x22, [x22, _supported_formats@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	add	x8, x0, x23
	ldr	w9, [x8, #28]
	cmp	w9, w21
	csel	x20, x8, x20, eq
	add	x24, x24, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #32
	cmp	x24, w0, sxtw
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x20, #0
LBB0_4:
	cmp	x20, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x20]
	add	w9, w8, #7
	add	w8, w8, #14
	cmp	w9, #0
	csel	w8, w8, w9, lt
	and	w8, w8, #0xfffffff8
Lloh2:
	adrp	x9, _HDLCD_REG_PIXEL_FORMAT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HDLCD_REG_PIXEL_FORMAT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x9]
	sub	w2, w8, #8
	mov	x0, x19
	bl	_hdlcd_write
Lloh5:
	adrp	x8, _HDLCD_REG_RED_SELECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDLCD_REG_RED_SELECT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldp	w8, w9, [x20, #20]
	ubfiz	w9, w9, #8, #4
	orr	w2, w9, w8
	mov	x0, x19
	bl	_hdlcd_write
Lloh8:
	adrp	x8, _HDLCD_REG_GREEN_SELECT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HDLCD_REG_GREEN_SELECT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldp	w8, w9, [x20, #12]
	ubfiz	w9, w9, #8, #4
	orr	w2, w9, w8
	mov	x0, x19
	bl	_hdlcd_write
Lloh11:
	adrp	x8, _HDLCD_REG_BLUE_SELECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HDLCD_REG_BLUE_SELECT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldp	w8, w9, [x20, #4]
	ubfiz	w9, w9, #8, #4
	orr	w2, w9, w8
	mov	x0, x19
	bl	_hdlcd_write
LBB0_6:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_supported_formats,8,3          ; @supported_formats
	.comm	_HDLCD_REG_PIXEL_FORMAT,4,2     ; @HDLCD_REG_PIXEL_FORMAT
	.comm	_HDLCD_REG_RED_SELECT,4,2       ; @HDLCD_REG_RED_SELECT
	.comm	_HDLCD_REG_GREEN_SELECT,4,2     ; @HDLCD_REG_GREEN_SELECT
	.comm	_HDLCD_REG_BLUE_SELECT,4,2      ; @HDLCD_REG_BLUE_SELECT
	.no_dead_strip	_hdlcd_set_pxl_fmt
.subsections_via_symbols
