	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function rbmp_convert_frame
LCPI0_0:
	.byte	2                               ## 0x2
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	3                               ## 0x3
	.byte	6                               ## 0x6
	.byte	5                               ## 0x5
	.byte	4                               ## 0x4
	.byte	7                               ## 0x7
	.byte	10                              ## 0xa
	.byte	9                               ## 0x9
	.byte	8                               ## 0x8
	.byte	11                              ## 0xb
	.byte	14                              ## 0xe
	.byte	13                              ## 0xd
	.byte	12                              ## 0xc
	.byte	15                              ## 0xf
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_rbmp_convert_frame:                    ## @rbmp_convert_frame
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	imull	%edx, %esi
	testl	%esi, %esi
	je	LBB0_7
## %bb.1:
	leaq	(%rdi,%rsi,4), %rax
	leaq	4(%rdi), %rcx
	cmpq	%rcx, %rax
	cmovaq	%rax, %rcx
	movq	%rdi, %r8
	notq	%r8
	addq	%rcx, %r8
	cmpq	$28, %r8
	jae	LBB0_3
## %bb.2:
	movq	%rdi, %rcx
	jmp	LBB0_6
LBB0_3:
	shrq	$2, %r8
	incq	%r8
	movq	%r8, %rsi
	andq	$-8, %rsi
	leaq	(%rdi,%rsi,4), %rcx
	xorl	%edx, %edx
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [2,1,0,3,6,5,4,7,10,9,8,11,14,13,12,15]
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rdx,4), %xmm1
	movdqu	16(%rdi,%rdx,4), %xmm2
	pshufb	%xmm0, %xmm1
	pshufb	%xmm0, %xmm2
	movdqu	%xmm1, (%rdi,%rdx,4)
	movdqu	%xmm2, 16(%rdi,%rdx,4)
	addq	$8, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_4
## %bb.5:
	cmpq	%rsi, %r8
	je	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %edx
	movl	%edx, %esi
	andl	$-16711936, %esi                ## imm = 0xFF00FF00
	movzbl	%dl, %edi
	shll	$16, %edi
	orl	%esi, %edi
	shrl	$16, %edx
	movzbl	%dl, %edx
	orl	%edi, %edx
	movl	%edx, (%rcx)
	addq	$4, %rcx
	cmpq	%rax, %rcx
	jb	LBB0_6
LBB0_7:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rbmp_convert_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rbmp_convert_frame
_rbmp_convert_frame:                    ; @rbmp_convert_frame
	.cfi_startproc
; %bb.0:
	mul	w8, w2, w1
	cbz	w8, LBB0_7
; %bb.1:
	add	x9, x0, x8, lsl #2
	add	x10, x0, #4
	cmp	x9, x10
	csel	x9, x9, x10, hi
	mvn	x10, x0
	add	x10, x9, x10
	mov	x9, x0
	cmp	x10, #60
	b.lo	LBB0_5
; %bb.2:
	lsr	x9, x10, #2
	add	x10, x9, #1
	and	x11, x10, #0x7ffffffffffffff0
	add	x9, x0, x11, lsl #2
	add	x12, x0, #32
	movi.2d	v0, #0xff000000ff0000
	movi.2d	v1, #0x0000ff000000ff
	mov	x13, x11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q2, q3, [x12, #-32]
	shl.4s	v4, v2, #16
	ldp	q5, q6, [x12]
	ushr.4s	v7, v2, #16
	bic.8h	v2, #255
	shl.4s	v16, v3, #16
	ushr.4s	v17, v3, #16
	bic.8h	v3, #255
	shl.4s	v18, v5, #16
	ushr.4s	v19, v5, #16
	bic.8h	v5, #255
	shl.4s	v20, v6, #16
	ushr.4s	v21, v6, #16
	bic.8h	v6, #255
	and.16b	v4, v4, v0
	and.16b	v16, v16, v0
	and.16b	v18, v18, v0
	and.16b	v20, v20, v0
	orr.16b	v2, v4, v2
	orr.16b	v3, v16, v3
	orr.16b	v4, v18, v5
	orr.16b	v5, v20, v6
	and.16b	v6, v7, v1
	and.16b	v7, v17, v1
	and.16b	v16, v19, v1
	and.16b	v17, v21, v1
	orr.16b	v2, v2, v6
	orr.16b	v3, v3, v7
	orr.16b	v4, v4, v16
	stp	q2, q3, [x12, #-32]
	orr.16b	v2, v5, v17
	stp	q4, q2, [x12], #64
	subs	x13, x13, #16
	b.ne	LBB0_3
; %bb.4:
	cmp	x10, x11
	b.eq	LBB0_7
LBB0_5:
	add	x8, x0, w8, uxtw #2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	and	w11, w10, #0xff00ff00
	bfi	w11, w10, #16, #8
	bfxil	w11, w10, #16, #8
	str	w11, [x9], #4
	cmp	x9, x8
	b.lo	LBB0_6
LBB0_7:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rbmp_convert_frame
.subsections_via_symbols
