	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function argb32_to_abgr1555
LCPI0_0:
	.quad	0x3f70101010101010              ## double 0.0039215686274509803
LCPI0_1:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_argb32_to_abgr1555:                    ## @argb32_to_abgr1555
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movl	%edi, %edx
	movl	%edi, %esi
	movzbl	%dh, %eax
	movzbl	%dl, %ecx
	movl	%edi, %ebx
	shrl	$24, %ebx
	shrl	$16, %esi
	movzbl	%sil, %edx
	cmpl	$255, %ebx
	je	LBB0_2
## %bb.1:
	cvtsi2ss	%ebx, %xmm0
	cvtss2sd	%xmm0, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	cvtsi2ss	%edx, %xmm1
	cvtsd2ss	%xmm0, %xmm0
	mulss	%xmm0, %xmm1
	cvtss2sd	%xmm1, %xmm1
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
	addsd	%xmm2, %xmm1
	cvttsd2si	%xmm1, %rdx
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm0, %xmm1
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm2, %xmm1
	cvttsd2si	%xmm1, %rax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ecx, %xmm1
	movzbl	%dl, %edx
	movzbl	%al, %eax
	mulss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	addsd	%xmm2, %xmm0
	cvttsd2si	%xmm0, %rcx
	movzbl	%cl, %ecx
LBB0_2:
	shrl	$3, %edx
	shll	$7, %ecx
	andl	$31744, %ecx                    ## imm = 0x7C00
	andl	$-8, %eax
	leal	(%rcx,%rax,4), %eax
	addl	%edx, %eax
	addl	$32768, %eax                    ## imm = 0x8000
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_argb32_to_abgr1555
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function argb32_to_abgr1555
lCPI0_0:
	.long	2                               ; 0x2
	.long	7                               ; 0x7
lCPI0_1:
	.long	992                             ; 0x3e0
	.long	31744                           ; 0x7c00
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_argb32_to_abgr1555:                    ; @argb32_to_abgr1555
	.cfi_startproc
; %bb.0:
	lsr	w9, w0, #24
	ubfx	w8, w0, #16, #8
	lsr	w10, w0, #8
	fmov	s0, w10
	mov.s	v0[1], w0
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	cmp	w9, #255
	b.eq	LBB0_2
; %bb.1:
	ucvtf	s2, w9
	fcvt	d2, s2
	mov	x9, #1157442765409226768
	movk	x9, #16240, lsl #48
	fmov	d3, x9
	fmul	d2, d2, d3
	fcvt	s2, d2
	ucvtf	s3, w8
	fmul	s3, s3, s2
	fcvt	d3, s3
	fmov	d4, #0.50000000
	fadd	d3, d3, d4
	fcvtzu	w8, d3
	and	w8, w8, #0xff
	ucvtf.2s	v0, v0
	fmul.2s	v0, v0, v2[0]
	fcvtl	v0.2d, v0.2s
	fmov.2d	v2, #0.50000000
	fadd.2d	v0, v0, v2
	fcvtzu.2d	v0, v0
	xtn.2s	v0, v0
	and.8b	v0, v0, v1
LBB0_2:
Lloh0:
	adrp	x9, lCPI0_0@PAGE
Lloh1:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
Lloh2:
	adrp	x9, lCPI0_1@PAGE
Lloh3:
	ldr	d1, [x9, lCPI0_1@PAGEOFF]
	and.8b	v0, v0, v1
	dup.2s	v1, v0[1]
	orr.8b	v0, v0, v1
	fmov	w9, s0
	orr	w8, w9, w8, lsr #3
	orr	w0, w8, #0x8000
	ret
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_argb32_to_abgr1555
.subsections_via_symbols
