	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_clear_fb                 ## -- Begin function vivid_clear_fb
	.p2align	4, 0x90
_vivid_clear_fb:                        ## @vivid_clear_fb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %r8d
	cmpl	$6, 12(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_rgb565@GOTPCREL(%rip), %rax
	testl	%r8d, %r8d
	jne	LBB0_4
	jmp	LBB0_10
LBB0_1:
	movq	_rgb555@GOTPCREL(%rip), %rax
	testl	%r8d, %r8d
	je	LBB0_10
LBB0_4:
	movq	(%rax), %r10
	movq	16(%rdi), %rcx
	movl	4(%rdi), %esi
	xorl	%r9d, %r9d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movslq	8(%rdi), %rax
	addq	%rax, %rcx
	incl	%r9d
	cmpl	%r8d, %r9d
	jae	LBB0_10
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	testl	%esi, %esi
	movl	$0, %esi
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r9d, %edx
	shrl	$4, %edx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %esi
	shrl	$4, %esi
	addl	%edx, %esi
	andl	$15, %esi
	movl	(%r10,%rsi,4), %esi
	movl	%esi, (%rcx,%rax,4)
	incq	%rax
	movl	4(%rdi), %esi
	cmpq	%rsi, %rax
	jb	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rdi), %r8d
	jmp	LBB0_9
LBB0_10:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rgb555,8,3                     ## @rgb555
	.comm	_rgb565,8,3                     ## @rgb565
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_clear_fb                 ; -- Begin function vivid_clear_fb
	.p2align	2
_vivid_clear_fb:                        ; @vivid_clear_fb
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _rgb565@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rgb565@GOTPAGEOFF]
	ldr	w9, [x0, #12]
Lloh2:
	adrp	x10, _rgb555@GOTPAGE
Lloh3:
	ldr	x10, [x10, _rgb555@GOTPAGEOFF]
	cmp	w9, #6
	csel	x9, x8, x10, eq
	ldr	w11, [x0]
	cbz	w11, LBB0_7
; %bb.1:
	mov	w8, #0
	ldr	x9, [x9]
	ldr	x10, [x0, #16]
	ldr	w12, [x0, #4]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x13, [x0, #8]
	add	x10, x10, x13
	add	w8, w8, #1
	cmp	w8, w11
	b.hs	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cbz	w12, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x11, #0
	lsr	w13, w8, #4
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w12, w13, w11, lsr #4
	and	w12, w12, #0xf
	ldr	w12, [x9, w12, uxtw #2]
	str	w12, [x10, x11, lsl #2]
	add	x11, x11, #1
	ldr	w12, [x0, #4]
	cmp	x11, x12
	b.lo	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x0]
	b	LBB0_2
LBB0_7:
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_rgb555,8,3                     ; @rgb555
	.comm	_rgb565,8,3                     ; @rgb565
.subsections_via_symbols
