	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psbfb_setcolreg
_psbfb_setcolreg:                       ## @psbfb_setcolreg
	.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
	movq	40(%r9), %rax
	movq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movl	$1, %eax
	cmpl	$255, %edi
	ja	LBB0_8
## %bb.3:
	movq	%r9, %rbx
	movl	%r8d, %r13d
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	36(%r9), %eax
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_CMAP_TOHW
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	20(%rbx), %esi
	movl	%r15d, %edi
	callq	_CMAP_TOHW
	movl	%eax, %r15d
	movl	28(%rbx), %esi
	movl	%r12d, %edi
	callq	_CMAP_TOHW
	movl	%eax, %r12d
	movl	12(%rbx), %esi
	movl	%r13d, %edi
	callq	_CMAP_TOHW
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	movb	32(%rbx), %cl
	shll	%cl, %edi
	movb	24(%rbx), %cl
	shll	%cl, %r12d
	movb	16(%rbx), %cl
	shll	%cl, %r15d
	movb	8(%rbx), %cl
	shll	%cl, %edx
	xorl	%eax, %eax
	cmpl	$15, %esi
	ja	LBB0_8
## %bb.4:
	orl	%edi, %r12d
	orl	%edx, %r15d
	orl	%r12d, %r15d
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	shll	$3, %ecx
	cmpl	$32, %ecx
	je	LBB0_7
## %bb.5:
	cmpl	$24, %ecx
	je	LBB0_7
## %bb.6:
	cmpl	$16, %ecx
	jne	LBB0_8
LBB0_7:
	movq	(%rbx), %rcx
	movl	%esi, %edx
	movl	%r15d, (%rcx,%rdx,4)
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_psbfb_setcolreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psbfb_setcolreg
_psbfb_setcolreg:                       ; @psbfb_setcolreg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x5, #40]
	ldr	x25, [x8]
	cbz	x25, LBB0_3
; %bb.1:
	mov	x20, x0
	cmp	w0, #255
	b.ls	LBB0_4
; %bb.2:
	mov	w0, #1
	b	LBB0_9
LBB0_3:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_4:
	mov	x19, x5
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	ldr	w8, [x5, #36]
	mov	x0, x1
	mov	x1, x8
	bl	_CMAP_TOHW
	mov	x23, x0
	ldr	w1, [x19, #20]
	mov	x0, x22
	bl	_CMAP_TOHW
	mov	x22, x0
	ldr	w1, [x19, #28]
	mov	x0, x24
	bl	_CMAP_TOHW
	mov	x24, x0
	ldr	w1, [x19, #12]
	mov	x0, x21
	bl	_CMAP_TOHW
	cmp	w20, #15
	b.hi	LBB0_8
; %bb.5:
	ldr	w8, [x19, #32]
	lsl	w8, w23, w8
	ldr	w9, [x19, #24]
	lsl	w9, w24, w9
	orr	w8, w9, w8
	ldr	w9, [x19, #16]
	lsl	w9, w22, w9
	orr	w8, w8, w9
	ldr	w9, [x19, #8]
	lsl	w9, w0, w9
	orr	w8, w8, w9
	ldr	x9, [x25]
	ldr	x9, [x9]
	ldr	w9, [x9]
	lsl	w9, w9, #3
	cmp	w9, #32
	ccmp	w9, #24, #4, ne
	b.eq	LBB0_7
; %bb.6:
	cmp	w9, #16
	b.ne	LBB0_8
LBB0_7:
	mov	w0, #0
	ldr	x9, [x19]
	str	w8, [x9, w20, uxtw #2]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_psbfb_setcolreg
.subsections_via_symbols
