	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps_mask_table_set_bits
_ps_mask_table_set_bits:                ## @ps_mask_table_set_bits
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	%rsi, %r14
	leaq	-48(%rbp), %rdx
	movl	%r8d, %esi
	callq	_ps_mask_table_last
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movq	-48(%rbp), %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_ps_mask_ensure
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movq	-48(%rbp), %rax
	movl	%r13d, (%rax)
	testl	%r13d, %r13d
	jle	LBB0_3
## %bb.4:
	movl	%r15d, %ecx
	andb	$7, %cl
	movl	$128, %r9d
	shrl	%cl, %r9d
	movq	8(%rax), %r12
	movl	$128, %r8d
	sarl	$3, %r15d
	movslq	%r15d, %rax
	leaq	(%r14,%rax,4), %r10
	incl	%r13d
	xorl	%eax, %eax
	movl	$128, %r11d
	movl	%r9d, %edi
	movl	%r11d, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	%r11d, %ebx
	notl	%ebx
	andl	%esi, %ebx
	movl	(%r10), %ecx
	andl	%r9d, %ecx
	orl	%r11d, %esi
	testl	%ecx, %ecx
	cmovel	%ebx, %esi
	movl	%esi, (%r12)
	sarl	%edi
	xorl	%ecx, %ecx
	cmpl	$2, %r9d
	setb	%cl
	leaq	(%r10,%rcx,4), %r10
	cmovbl	%r8d, %edi
	sarl	%edx
	xorl	%ecx, %ecx
	cmpl	$2, %r11d
	setb	%cl
	leaq	(%r12,%rcx,4), %r12
	cmovbl	%r8d, %edx
	decl	%r13d
	movl	%edx, %r11d
	movl	%edi, %r9d
	cmpl	$1, %r13d
	ja	LBB0_5
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ps_mask_table_set_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps_mask_table_set_bits
_ps_mask_table_set_bits:                ; @ps_mask_table_set_bits
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x22, x4
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	add	x2, sp, #8
	mov	x1, x4
	bl	_ps_mask_table_last
	cbnz	x0, LBB0_6
; %bb.1:
	ldr	x0, [sp, #8]
	mov	x1, x19
	mov	x2, x22
	bl	_ps_mask_ensure
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	x8, [sp, #8]
	str	w19, [x8]
	cmp	w19, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	x8, [x8, #8]
	and	w10, w21, #0x7
	mov	w9, #128
	lsr	w11, w9, w10
	asr	w10, w21, #3
	add	x10, x20, w10, sxtw #2
	add	w12, w19, #1
	mov	w13, #128
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x8]
	bic	w15, w14, w13
	ldr	w16, [x10]
	orr	w14, w14, w13
	tst	w16, w11
	csel	w14, w15, w14, eq
	str	w14, [x8]
	asr	w14, w11, #1
	cmp	w11, #2
	csel	w11, w9, w14, lo
	cset	w14, lo
	add	x10, x10, w14, uxtw #2
	asr	w14, w13, #1
	cmp	w13, #2
	csel	w13, w9, w14, lo
	cset	w14, lo
	add	x8, x8, w14, uxtw #2
	sub	w12, w12, #1
	cmp	w12, #1
	b.hi	LBB0_4
LBB0_5:
	mov	x0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ps_mask_table_set_bits
.subsections_via_symbols
