	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setcmap_pseudo_palette
_setcmap_pseudo_palette:                ## @setcmap_pseudo_palette
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	4(%rdi), %eax
	movl	(%rdi), %ecx
	addl	%eax, %ecx
	cmpl	$16, %ecx
	jle	LBB0_1
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_1:
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movq	32(%rsi), %r8
	movq	8(%rdi), %r9
	movq	16(%rdi), %r10
	movq	24(%rdi), %r11
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	(%rdi), %rax
	addq	%r14, %rax
	movl	%edx, (%r8,%rax,4)
	incq	%r14
	movslq	4(%rdi), %rax
	cmpq	%rax, %r14
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movb	$16, %cl
	subb	24(%rsi), %cl
	movl	(%r9,%r14,4), %ebx
	sarl	%cl, %ebx
	movb	$16, %cl
	subb	16(%rsi), %cl
	movl	(%r10,%r14,4), %eax
	sarl	%cl, %eax
	movb	$16, %cl
	subb	8(%rsi), %cl
	movl	(%r11,%r14,4), %edx
	sarl	%cl, %edx
	movzbl	28(%rsi), %ecx
	shll	%cl, %ebx
	movzbl	20(%rsi), %ecx
	shll	%cl, %eax
	movzbl	12(%rsi), %ecx
	shll	%cl, %edx
	orl	%ebx, %eax
	orl	%eax, %edx
	movl	(%rsi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$-1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	notl	%eax
	movzbl	4(%rsi), %ecx
	shll	%cl, %eax
	orl	%eax, %edx
	jmp	LBB0_5
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_setcmap_pseudo_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setcmap_pseudo_palette
_setcmap_pseudo_palette:                ; @setcmap_pseudo_palette
	.cfi_startproc
; %bb.0:
	ldp	w9, w8, [x0]
	add	w9, w8, w9
	cmp	w9, #16
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_2:
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x8, #0
	ldr	x9, [x1, #32]
	ldp	x10, x11, [x0, #8]
	mov	w12, #16
	mov	w13, #-1
	ldr	x14, [x0, #24]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x16, [x0]
	add	x16, x8, x16
	str	w15, [x9, x16, lsl #2]
	add	x8, x8, #1
	ldrsw	x15, [x0, #4]
	cmp	x8, x15
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x15, x8, #2
	ldr	w16, [x10, x15]
	ldr	w17, [x11, x15]
	ldr	w15, [x14, x15]
	ldp	w2, w3, [x1, #24]
	sub	w2, w12, w2
	asr	w16, w16, w2
	ldp	w2, w4, [x1, #16]
	sub	w2, w12, w2
	asr	w17, w17, w2
	ldp	w2, w5, [x1, #8]
	sub	w2, w12, w2
	asr	w15, w15, w2
	lsl	w16, w16, w3
	lsl	w17, w17, w4
	orr	w16, w17, w16
	lsl	w15, w15, w5
	orr	w15, w16, w15
	ldr	w16, [x1]
	cmp	w16, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	w16, w13, w16
	mvn	w16, w16
	ldr	w17, [x1, #4]
	lsl	w16, w16, w17
	orr	w15, w16, w15
	b	LBB0_4
LBB0_7:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_setcmap_pseudo_palette
.subsections_via_symbols
