	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function read_source_layers_cache
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
LCPI0_2:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
LCPI0_3:
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
LCPI0_4:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
LCPI0_5:
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
LCPI0_6:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_read_source_layers_cache
	.p2align	4, 0x90
_read_source_layers_cache:              ## @read_source_layers_cache
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_MAX_LAYER_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	jle	LBB0_1
## %bb.2:
	movq	_MATRIX_COLS@GOTPCREL(%rip), %rax
	movq	%rdi, %rcx
	shrq	$32, %rcx
	imull	(%rax), %ecx
	leal	(%rcx,%rdi), %eax
	addl	$7, %eax
	movl	%ecx, %r10d
	addl	%edi, %r10d
	cmovnsl	%r10d, %eax
	sarl	$3, %eax
	movq	_source_layers_cache@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movq	(%rcx,%rax,8), %rdi
	andl	$7, %r10d
	cmpl	$8, %r9d
	jae	LBB0_4
## %bb.3:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_4:
	movl	%r9d, %ecx
	andl	$-8, %ecx
	movd	%r10d, %xmm0
	leaq	-8(%rcx), %rax
	movq	%rax, %r8
	shrq	$3, %r8
	incq	%r8
	pmovzxdq	%xmm0, %xmm14                   ## xmm14 = xmm0[0],zero,xmm0[1],zero
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r8, %rdx
	andq	$-2, %rdx
	movdqa	LCPI0_0(%rip), %xmm15           ## xmm15 = [0,1,2,3]
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm12           ## xmm12 = [1,1,1,1]
	movdqa	LCPI0_3(%rip), %xmm13           ## xmm13 = [1065353216,1065353216,1065353216,1065353216]
	movdqa	LCPI0_4(%rip), %xmm9            ## xmm9 = [8,8,8,8]
	movdqa	LCPI0_5(%rip), %xmm10           ## xmm10 = [12,12,12,12]
	movdqa	LCPI0_6(%rip), %xmm11           ## xmm11 = [16,16,16,16]
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm15, %xmm6
	paddd	%xmm8, %xmm6
	movdqu	(%rdi,%rax,4), %xmm1
	movdqu	16(%rdi,%rax,4), %xmm0
	movdqu	32(%rdi,%rax,4), %xmm7
	psrld	%xmm14, %xmm1
	movdqu	48(%rdi,%rax,4), %xmm4
	psrld	%xmm14, %xmm0
	pand	%xmm12, %xmm1
	pand	%xmm12, %xmm0
	movdqa	%xmm15, %xmm5
	pslld	$23, %xmm5
	paddd	%xmm13, %xmm5
	cvttps2dq	%xmm5, %xmm5
	pmulld	%xmm1, %xmm5
	por	%xmm2, %xmm5
	pslld	$23, %xmm6
	paddd	%xmm13, %xmm6
	cvttps2dq	%xmm6, %xmm6
	pmulld	%xmm0, %xmm6
	por	%xmm3, %xmm6
	movdqa	%xmm15, %xmm0
	paddd	%xmm9, %xmm0
	movdqa	%xmm15, %xmm1
	psrld	%xmm14, %xmm7
	psrld	%xmm14, %xmm4
	paddd	%xmm10, %xmm1
	pand	%xmm12, %xmm7
	pand	%xmm12, %xmm4
	pslld	$23, %xmm0
	paddd	%xmm13, %xmm0
	cvttps2dq	%xmm0, %xmm2
	pmulld	%xmm7, %xmm2
	por	%xmm5, %xmm2
	pslld	$23, %xmm1
	paddd	%xmm13, %xmm1
	cvttps2dq	%xmm1, %xmm3
	pmulld	%xmm4, %xmm3
	por	%xmm6, %xmm3
	addq	$16, %rax
	paddd	%xmm11, %xmm15
	addq	$-2, %rdx
	jne	LBB0_7
## %bb.8:
	testb	$1, %r8b
	je	LBB0_10
LBB0_9:
	movdqa	LCPI0_1(%rip), %xmm0            ## xmm0 = [4,4,4,4]
	paddd	%xmm15, %xmm0
	movdqu	(%rdi,%rax,4), %xmm1
	movdqu	16(%rdi,%rax,4), %xmm4
	psrld	%xmm14, %xmm1
	psrld	%xmm14, %xmm4
	movdqa	LCPI0_2(%rip), %xmm5            ## xmm5 = [1,1,1,1]
	pand	%xmm5, %xmm1
	pand	%xmm5, %xmm4
	pslld	$23, %xmm15
	movdqa	LCPI0_3(%rip), %xmm5            ## xmm5 = [1065353216,1065353216,1065353216,1065353216]
	paddd	%xmm5, %xmm15
	cvttps2dq	%xmm15, %xmm6
	pmulld	%xmm1, %xmm6
	por	%xmm6, %xmm2
	pslld	$23, %xmm0
	paddd	%xmm5, %xmm0
	cvttps2dq	%xmm0, %xmm0
	pmulld	%xmm4, %xmm0
	por	%xmm0, %xmm3
LBB0_10:
	por	%xmm3, %xmm2
	pshufd	$238, %xmm2, %xmm0              ## xmm0 = xmm2[2,3,2,3]
	por	%xmm2, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	por	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpq	%r9, %rcx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rcx,4), %edx
	xorl	%esi, %esi
	btl	%r10d, %edx
	setb	%sil
	shll	%cl, %esi
	orl	%esi, %eax
	incq	%rcx
	cmpq	%rcx, %r9
	jne	LBB0_11
LBB0_12:
	popq	%rbp
	retq
LBB0_5:
	movdqa	LCPI0_0(%rip), %xmm15           ## xmm15 = [0,1,2,3]
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	testb	$1, %r8b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MATRIX_COLS,4,2                ## @MATRIX_COLS
	.comm	_MAX_LAYER_BITS,4,2             ## @MAX_LAYER_BITS
	.comm	_source_layers_cache,8,3        ## @source_layers_cache
.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 read_source_layers_cache
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_read_source_layers_cache
	.p2align	2
_read_source_layers_cache:              ; @read_source_layers_cache
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _MAX_LAYER_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_LAYER_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _MATRIX_COLS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MATRIX_COLS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsr	x10, x0, #32
	madd	w10, w9, w10, w0
	add	w9, w10, #7
	cmp	w10, #0
	csel	w9, w9, w10, lt
Lloh6:
	adrp	x11, _source_layers_cache@GOTPAGE
Lloh7:
	ldr	x11, [x11, _source_layers_cache@GOTPAGEOFF]
	asr	w9, w9, #3
Lloh8:
	ldr	x11, [x11]
	ldr	x9, [x11, w9, sxtw #3]
	and	w10, w10, #0x7
	cmp	w8, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x11, #0
	mov	w0, #0
	b	LBB0_7
LBB0_3:
	mov	w0, #0
	ret
LBB0_4:
	and	x11, x8, #0xfffffff0
	dup.4s	v5, w10
	movi.2d	v0, #0000000000000000
	movi.4s	v1, #4
	movi.4s	v2, #8
Lloh9:
	adrp	x12, lCPI0_0@PAGE
Lloh10:
	ldr	q3, [x12, lCPI0_0@PAGEOFF]
	movi.4s	v4, #12
	add	x12, x9, #32
	neg.4s	v5, v5
	movi.4s	v6, #1
	movi.4s	v7, #16
	mov	x13, x11
	movi.2d	v16, #0000000000000000
	movi.2d	v17, #0000000000000000
	movi.2d	v18, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v19, v3, v1
	add.4s	v20, v3, v2
	add.4s	v21, v3, v4
	ldp	q22, q23, [x12, #-32]
	ldp	q24, q25, [x12], #64
	ushl.4s	v22, v22, v5
	ushl.4s	v23, v23, v5
	ushl.4s	v24, v24, v5
	ushl.4s	v25, v25, v5
	and.16b	v22, v22, v6
	and.16b	v23, v23, v6
	and.16b	v24, v24, v6
	and.16b	v25, v25, v6
	ushl.4s	v22, v22, v3
	ushl.4s	v19, v23, v19
	ushl.4s	v20, v24, v20
	ushl.4s	v21, v25, v21
	orr.16b	v0, v22, v0
	orr.16b	v16, v19, v16
	orr.16b	v17, v20, v17
	orr.16b	v18, v21, v18
	add.4s	v3, v3, v7
	subs	x13, x13, #16
	b.ne	LBB0_5
; %bb.6:
	orr.16b	v0, v16, v0
	orr.16b	v0, v17, v0
	orr.16b	v0, v18, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	fmov	w12, s0
	mov.s	w13, v0[1]
	orr	w0, w12, w13
	cmp	x11, x8
	b.eq	LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9, x11, lsl #2]
	lsr	w12, w12, w10
	and	w12, w12, #0x1
	lsl	w12, w12, w11
	orr	w0, w12, w0
	add	x11, x11, #1
	cmp	x8, x11
	b.ne	LBB0_7
LBB0_8:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MATRIX_COLS,4,2                ; @MATRIX_COLS
	.comm	_MAX_LAYER_BITS,4,2             ; @MAX_LAYER_BITS
	.comm	_source_layers_cache,8,3        ; @source_layers_cache
.subsections_via_symbols
