	.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_shiftsigned
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_rbmp_shiftsigned:                      ## @rbmp_shiftsigned
	.cfi_startproc
## %bb.0:
	movl	%esi, %eax
	movl	%eax, %ecx
	negb	%cl
	movl	%edi, %esi
	shll	%cl, %esi
	movl	%eax, %ecx
	sarl	%cl, %edi
	testl	%eax, %eax
	cmovsl	%esi, %edi
	cmpl	$7, %edx
	jg	LBB0_1
## %bb.2:
	movl	%edx, %r10d
	leal	(%r10,%r10), %ecx
	cmpl	$9, %ecx
	movl	$8, %eax
	cmovgel	%ecx, %eax
	xorl	%esi, %esi
	cmpl	$8, %ecx
	setl	%sil
	leal	(%rsi,%r10,2), %ecx
	subl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r10d
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rsi), %r8d
	incl	%r8d
	movl	%r10d, %ecx
	movl	%edi, %eax
	cmpl	$8, %r8d
	jb	LBB0_11
## %bb.3:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%r8d, %ecx
	andl	$-8, %ecx
	movd	%r10d, %xmm0
	pshufd	$0, %xmm0, %xmm8                ## xmm8 = xmm0[0,0,0,0]
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = [0,1,2,3]
	pmulld	%xmm8, %xmm4
	paddd	%xmm8, %xmm4
	pslld	$2, %xmm8
	movd	%edi, %xmm2
	pshufd	$0, %xmm2, %xmm10               ## xmm10 = xmm2[0,0,0,0]
	leal	-8(%rcx), %eax
	movl	%eax, %r9d
	shrl	$3, %r9d
	incl	%r9d
	testl	%eax, %eax
	popq	%rbp
	je	LBB0_4
## %bb.5:
	movl	%r9d, %eax
	andl	$-2, %eax
	xorl	%edx, %edx
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	pshuflw	$254, %xmm4, %xmm5              ## xmm5 = xmm4[2,3,3,3,4,5,6,7]
	pshufd	$238, %xmm4, %xmm6              ## xmm6 = xmm4[2,3,2,3]
	pshuflw	$84, %xmm4, %xmm9               ## xmm9 = xmm4[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm0
	psrad	%xmm5, %xmm0
	pshuflw	$254, %xmm6, %xmm5              ## xmm5 = xmm6[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm1
	psrad	%xmm5, %xmm1
	movdqa	%xmm10, %xmm5
	psrad	%xmm9, %xmm5
	paddd	%xmm8, %xmm4
	pshuflw	$84, %xmm6, %xmm7               ## xmm7 = xmm6[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm6
	psrad	%xmm7, %xmm6
	pblendw	$15, %xmm0, %xmm1               ## xmm1 = xmm0[0,1,2,3],xmm1[4,5,6,7]
	pblendw	$15, %xmm5, %xmm6               ## xmm6 = xmm5[0,1,2,3],xmm6[4,5,6,7]
	pblendw	$204, %xmm1, %xmm6              ## xmm6 = xmm6[0,1],xmm1[2,3],xmm6[4,5],xmm1[6,7]
	paddd	%xmm2, %xmm6
	pshuflw	$254, %xmm4, %xmm0              ## xmm0 = xmm4[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm1
	psrad	%xmm0, %xmm1
	pshufd	$238, %xmm4, %xmm0              ## xmm0 = xmm4[2,3,2,3]
	pshuflw	$254, %xmm0, %xmm2              ## xmm2 = xmm0[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm7
	psrad	%xmm2, %xmm7
	pblendw	$15, %xmm1, %xmm7               ## xmm7 = xmm1[0,1,2,3],xmm7[4,5,6,7]
	pshuflw	$84, %xmm4, %xmm1               ## xmm1 = xmm4[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm2
	psrad	%xmm1, %xmm2
	pshuflw	$84, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm5
	psrad	%xmm0, %xmm5
	pblendw	$15, %xmm2, %xmm5               ## xmm5 = xmm2[0,1,2,3],xmm5[4,5,6,7]
	pblendw	$204, %xmm7, %xmm5              ## xmm5 = xmm5[0,1],xmm7[2,3],xmm5[4,5],xmm7[6,7]
	paddd	%xmm3, %xmm5
	paddd	%xmm8, %xmm4
	pshuflw	$254, %xmm4, %xmm0              ## xmm0 = xmm4[2,3,3,3,4,5,6,7]
	pshufd	$238, %xmm4, %xmm1              ## xmm1 = xmm4[2,3,2,3]
	pshuflw	$84, %xmm4, %xmm2               ## xmm2 = xmm4[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm3
	psrad	%xmm0, %xmm3
	pshuflw	$254, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm7
	psrad	%xmm0, %xmm7
	movdqa	%xmm10, %xmm0
	psrad	%xmm2, %xmm0
	paddd	%xmm8, %xmm4
	pshuflw	$84, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm2
	psrad	%xmm1, %xmm2
	pblendw	$15, %xmm3, %xmm7               ## xmm7 = xmm3[0,1,2,3],xmm7[4,5,6,7]
	pblendw	$15, %xmm0, %xmm2               ## xmm2 = xmm0[0,1,2,3],xmm2[4,5,6,7]
	pblendw	$204, %xmm7, %xmm2              ## xmm2 = xmm2[0,1],xmm7[2,3],xmm2[4,5],xmm7[6,7]
	paddd	%xmm6, %xmm2
	pshuflw	$254, %xmm4, %xmm0              ## xmm0 = xmm4[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm1
	psrad	%xmm0, %xmm1
	pshufd	$238, %xmm4, %xmm0              ## xmm0 = xmm4[2,3,2,3]
	pshuflw	$254, %xmm0, %xmm3              ## xmm3 = xmm0[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm6
	psrad	%xmm3, %xmm6
	pblendw	$15, %xmm1, %xmm6               ## xmm6 = xmm1[0,1,2,3],xmm6[4,5,6,7]
	pshuflw	$84, %xmm4, %xmm1               ## xmm1 = xmm4[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm7
	psrad	%xmm1, %xmm7
	pshuflw	$84, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm3
	psrad	%xmm0, %xmm3
	pblendw	$15, %xmm7, %xmm3               ## xmm3 = xmm7[0,1,2,3],xmm3[4,5,6,7]
	pblendw	$204, %xmm6, %xmm3              ## xmm3 = xmm3[0,1],xmm6[2,3],xmm3[4,5],xmm6[6,7]
	paddd	%xmm5, %xmm3
	paddd	%xmm8, %xmm4
	addl	$2, %edx
	cmpl	%eax, %edx
	jne	LBB0_6
## %bb.7:
	testb	$1, %r9b
	je	LBB0_9
LBB0_8:
	pshuflw	$254, %xmm4, %xmm0              ## xmm0 = xmm4[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm1
	psrad	%xmm0, %xmm1
	pshufd	$238, %xmm4, %xmm0              ## xmm0 = xmm4[2,3,2,3]
	pshuflw	$254, %xmm0, %xmm5              ## xmm5 = xmm0[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm6
	psrad	%xmm5, %xmm6
	paddd	%xmm4, %xmm8
	pshuflw	$84, %xmm4, %xmm4               ## xmm4 = xmm4[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm5
	psrad	%xmm4, %xmm5
	pblendw	$15, %xmm1, %xmm6               ## xmm6 = xmm1[0,1,2,3],xmm6[4,5,6,7]
	pshuflw	$84, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm1
	psrad	%xmm0, %xmm1
	pblendw	$15, %xmm5, %xmm1               ## xmm1 = xmm5[0,1,2,3],xmm1[4,5,6,7]
	pshuflw	$254, %xmm8, %xmm0              ## xmm0 = xmm8[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm4
	psrad	%xmm0, %xmm4
	pshufd	$238, %xmm8, %xmm0              ## xmm0 = xmm8[2,3,2,3]
	pshuflw	$254, %xmm0, %xmm5              ## xmm5 = xmm0[2,3,3,3,4,5,6,7]
	movdqa	%xmm10, %xmm7
	psrad	%xmm5, %xmm7
	pblendw	$204, %xmm6, %xmm1              ## xmm1 = xmm1[0,1],xmm6[2,3],xmm1[4,5],xmm6[6,7]
	pshuflw	$84, %xmm8, %xmm5               ## xmm5 = xmm8[0,1,1,1,4,5,6,7]
	movdqa	%xmm10, %xmm6
	psrad	%xmm5, %xmm6
	paddd	%xmm1, %xmm2
	pshuflw	$84, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,1,1,4,5,6,7]
	psrad	%xmm0, %xmm10
	pblendw	$15, %xmm4, %xmm7               ## xmm7 = xmm4[0,1,2,3],xmm7[4,5,6,7]
	pblendw	$15, %xmm6, %xmm10              ## xmm10 = xmm6[0,1,2,3],xmm10[4,5,6,7]
	pblendw	$204, %xmm7, %xmm10             ## xmm10 = xmm10[0,1],xmm7[2,3],xmm10[4,5],xmm7[6,7]
	paddd	%xmm10, %xmm3
LBB0_9:
	paddd	%xmm3, %xmm2
	pshufd	$238, %xmm2, %xmm0              ## xmm0 = xmm2[2,3,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpl	%ecx, %r8d
	je	LBB0_12
## %bb.10:
	imull	%r10d, %ecx
	addl	%r10d, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%edi, %edx
	sarl	%cl, %edx
	addl	%edx, %eax
	addl	%r10d, %ecx
	cmpl	$8, %ecx
	jl	LBB0_11
LBB0_12:
	retq
LBB0_1:
	movl	%edi, %eax
	retq
LBB0_4:
	pxor	%xmm3, %xmm3
	testb	$1, %r9b
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rbmp_shiftsigned
.subsections_via_symbols

	.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_shiftsigned
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rbmp_shiftsigned:                      ; @rbmp_shiftsigned
	.cfi_startproc
; %bb.0:
	neg	w8, w1
	lsl	w8, w0, w8
	asr	w9, w0, w1
	cmp	w1, #0
	csel	w8, w8, w9, lt
	mov	x0, x8
	cmp	w2, #7
	b.gt	LBB0_6
; %bb.1:
	lsl	w9, w2, #1
	mov	w10, #8
	cmp	w9, #8
	csel	w10, w9, w10, gt
	cset	w11, lt
	bfi	w11, w2, #1, #31
	sub	w10, w10, w11
	cmp	w9, #8
	udiv	w9, w10, w2
	cinc	w9, w9, lt
	add	w10, w9, #1
	mov	x9, x2
	cmp	w10, #16
	b.lo	LBB0_5
; %bb.2:
	mov	w12, #0
	and	w11, w10, #0xfffffff0
Lloh0:
	adrp	x9, lCPI0_0@PAGE
Lloh1:
	ldr	q1, [x9, lCPI0_0@PAGEOFF]
	lsl	w9, w2, #2
	dup.4s	v0, w9
	madd	w9, w11, w2, w2
	dup.4s	v6, w2
	mla.4s	v6, v6, v1
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	mov.s	v2[0], w8
	dup.4s	v3, w8
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v7, v6, v0
	add.4s	v16, v7, v0
	add.4s	v17, v16, v0
	neg.4s	v6, v6
	sshl.4s	v6, v3, v6
	neg.4s	v7, v7
	sshl.4s	v7, v3, v7
	neg.4s	v16, v16
	sshl.4s	v16, v3, v16
	neg.4s	v18, v17
	sshl.4s	v18, v3, v18
	add.4s	v2, v6, v2
	add.4s	v1, v7, v1
	add.4s	v4, v16, v4
	add.4s	v5, v18, v5
	add	w12, w12, #16
	add.4s	v6, v17, v0
	cmp	w12, w11
	b.ne	LBB0_3
; %bb.4:
	add.4s	v0, v1, v2
	add.4s	v0, v4, v0
	add.4s	v0, v5, v0
	addv.4s	s0, v0
	fmov	w0, s0
	cmp	w10, w11
	b.eq	LBB0_6
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	asr	w10, w8, w9
	add	w0, w10, w0
	add	w9, w9, w2
	cmp	w9, #8
	b.lt	LBB0_5
LBB0_6:
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rbmp_shiftsigned
.subsections_via_symbols
