	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function convert_pal555
LCPI0_0:
	.long	4160813056                      ## 0xf800f800
	.long	4160813056                      ## 0xf800f800
	.long	4160813056                      ## 0xf800f800
	.long	4160813056                      ## 0xf800f800
LCPI0_1:
	.long	130025408                       ## 0x7c007c0
	.long	130025408                       ## 0x7c007c0
	.long	130025408                       ## 0x7c007c0
	.long	130025408                       ## 0x7c007c0
LCPI0_2:
	.long	4128831                         ## 0x3f003f
	.long	4128831                         ## 0x3f003f
	.long	4128831                         ## 0x3f003f
	.long	4128831                         ## 0x3f003f
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_convert_pal555:                        ## @convert_pal555
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_Pico32xMem@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rax
	movq	8(%rcx), %r9
	testl	%edi, %edi
	movl	$2097184, %r8d                  ## imm = 0x200020
	cmovel	%edi, %r8d
	movq	%rax, %rsi
	subq	%r9, %rsi
	cmpq	$31, %rsi
	ja	LBB0_3
## %bb.1:
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r9,%rsi,4), %edi
	movl	%edi, %edx
	shll	$11, %edx
	andl	$-134154240, %edx               ## imm = 0xF800F800
	movl	%edi, %ecx
	andl	$65012704, %ecx                 ## imm = 0x3E003E0
	leal	(%rdx,%rcx,2), %ecx
	shrl	$10, %edi
	andl	$4128831, %edi                  ## imm = 0x3F003F
	orl	%ecx, %edi
	xorl	%r8d, %edi
	movl	%edi, (%rax,%rsi,4)
	movl	4(%r9,%rsi,4), %ecx
	movl	%ecx, %edx
	shll	$11, %edx
	andl	$-134154240, %edx               ## imm = 0xF800F800
	movl	%ecx, %edi
	andl	$65012704, %edi                 ## imm = 0x3E003E0
	leal	(%rdx,%rdi,2), %edx
	shrl	$10, %ecx
	andl	$4128831, %ecx                  ## imm = 0x3F003F
	orl	%edx, %ecx
	xorl	%r8d, %ecx
	movl	%ecx, 4(%rax,%rsi,4)
	addq	$2, %rsi
	cmpl	$128, %esi
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movd	%r8d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	xorl	%edx, %edx
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [4160813056,4160813056,4160813056,4160813056]
	movdqa	LCPI0_1(%rip), %xmm9            ## xmm9 = [130025408,130025408,130025408,130025408]
	movdqa	LCPI0_2(%rip), %xmm3            ## xmm3 = [4128831,4128831,4128831,4128831]
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r9,%rdx,4), %xmm4
	movdqu	16(%r9,%rdx,4), %xmm5
	movdqa	%xmm4, %xmm6
	pslld	$11, %xmm6
	movdqa	%xmm5, %xmm7
	pslld	$11, %xmm7
	pand	%xmm8, %xmm6
	pand	%xmm8, %xmm7
	movdqa	%xmm4, %xmm1
	paddd	%xmm4, %xmm1
	movdqa	%xmm5, %xmm2
	paddd	%xmm5, %xmm2
	pand	%xmm9, %xmm1
	por	%xmm6, %xmm1
	pand	%xmm9, %xmm2
	por	%xmm7, %xmm2
	psrld	$10, %xmm4
	psrld	$10, %xmm5
	pand	%xmm3, %xmm4
	por	%xmm1, %xmm4
	pand	%xmm3, %xmm5
	por	%xmm2, %xmm5
	pxor	%xmm0, %xmm4
	pxor	%xmm0, %xmm5
	movdqu	%xmm4, (%rax,%rdx,4)
	movdqu	%xmm5, 16(%rax,%rdx,4)
	addq	$8, %rdx
	cmpq	$128, %rdx
	jne	LBB0_4
LBB0_5:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico32xMem,8,3                 ## @Pico32xMem
	.comm	_Pico32x,8,3                    ## @Pico32x
	.no_dead_strip	_convert_pal555
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_pal555
_convert_pal555:                        ; @convert_pal555
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _Pico32xMem@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Pico32xMem@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldp	x10, x8, [x9]
	mov	w9, #2097184
	cmp	w0, #0
	csel	w11, wzr, w9, eq
	sub	x9, x10, x8
	cmp	x9, #63
	b.hi	LBB0_3
; %bb.1:
	mov	w9, #129
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x8], #4
	lsl	w13, w12, #11
	and	w13, w13, #0xf800f800
	lsl	w14, w12, #1
	and	w14, w14, #0x7c007c0
	orr	w13, w13, w14
	lsr	w12, w12, #10
	and	w12, w12, #0x3f003f
	orr	w12, w13, w12
	eor	w12, w12, w11
	str	w12, [x10], #4
	sub	w9, w9, #1
	cmp	w9, #1
	b.hi	LBB0_2
	b	LBB0_5
LBB0_3:
	mov	x9, #0
	dup.4s	v0, w11
	add	x10, x10, #32
	movi.8h	v1, #248, lsl #8
	mov	w11, #130025408
	dup.4s	v2, w11
	movi.8h	v3, #63
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x8, x9
	ldp	q4, q5, [x11]
	shl.4s	v6, v4, #11
	shl.4s	v7, v5, #11
	ldp	q16, q17, [x11, #32]
	shl.4s	v18, v16, #11
	shl.4s	v19, v17, #11
	and.16b	v6, v6, v1
	and.16b	v7, v7, v1
	and.16b	v18, v18, v1
	and.16b	v19, v19, v1
	shl.4s	v20, v4, #1
	shl.4s	v21, v5, #1
	shl.4s	v22, v16, #1
	shl.4s	v23, v17, #1
	and.16b	v20, v20, v2
	and.16b	v21, v21, v2
	and.16b	v22, v22, v2
	and.16b	v23, v23, v2
	orr.16b	v6, v6, v20
	orr.16b	v7, v7, v21
	orr.16b	v18, v18, v22
	orr.16b	v19, v19, v23
	ushr.4s	v4, v4, #10
	ushr.4s	v5, v5, #10
	ushr.4s	v16, v16, #10
	ushr.4s	v17, v17, #10
	and.16b	v4, v4, v3
	and.16b	v5, v5, v3
	and.16b	v16, v16, v3
	and.16b	v17, v17, v3
	orr.16b	v4, v6, v4
	orr.16b	v5, v7, v5
	orr.16b	v6, v18, v16
	orr.16b	v7, v19, v17
	eor.16b	v4, v4, v0
	eor.16b	v5, v5, v0
	eor.16b	v6, v6, v0
	eor.16b	v7, v7, v0
	add	x11, x10, x9
	stp	q4, q5, [x11, #-32]
	stp	q6, q7, [x11]
	add	x9, x9, #64
	cmp	x9, #512
	b.ne	LBB0_4
LBB0_5:
Lloh3:
	adrp	x8, _Pico32x@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico32xMem,8,3                 ; @Pico32xMem
	.comm	_Pico32x,8,3                    ; @Pico32x
	.no_dead_strip	_convert_pal555
.subsections_via_symbols
