	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chs_assemble_msbs_lsbs
_chs_assemble_msbs_lsbs:                ## @chs_assemble_msbs_lsbs
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rsi)
	jle	LBB0_33
## %bb.1:
	movq	%rsi, %r12
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r13d
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movq	8(%rsi), %rcx
	shlq	$5, %rax
	leaq	(%rcx,%rax), %rdx
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	addq	%rcx, %rax
	addq	$24, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, %eax
	andl	$-8, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	addq	$-8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rcx
	shrq	$3, %rcx
	incq	%rcx
	movq	%rcx, %rax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	andq	$-2, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rax
	negq	%rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	(%r12), %rax
	cmpq	%rax, %r15
	jge	LBB0_33
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_30 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	callq	_chs_get_lsb_width
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r11d
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rcx
	movq	(%rcx,%r15,8), %rsi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	cmpq	$0, (%rcx,%r15,8)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r13d, %r13d
	jle	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-16(%rax), %rcx
	movq	(%rcx,%r15,8), %r14
	movq	-8(%rax), %rcx
	movl	(%rcx,%r15,4), %r10d
	cmpl	$8, %r13d
	jb	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r13,4), %rcx
	cmpq	%rcx, %rsi
	jae	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rsi,%r13,4), %rcx
	cmpq	%rcx, %r14
	jae	LBB0_21
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r8d, %r8d
LBB0_27:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r8, %rbx
	testb	$1, %r13b
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rsi,%r8,4), %r9d
	movl	%r11d, %ecx
	shll	%cl, %r9d
	movl	(%r14,%r8,4), %ebx
	movl	%r10d, %ecx
	shll	%cl, %ebx
	addl	%r9d, %ebx
	movl	%ebx, (%rsi,%r8,4)
	movq	%r8, %rbx
	orq	$1, %rbx
LBB0_29:                                ##   in Loop: Header=BB0_3 Depth=1
	notq	%r8
	cmpq	-104(%rbp), %r8                 ## 8-byte Folded Reload
	je	LBB0_2
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rbx,4), %edx
	movl	4(%rsi,%rbx,4), %eax
	movl	%r11d, %ecx
	shll	%cl, %edx
	movl	(%r14,%rbx,4), %edi
	movl	%r10d, %ecx
	shll	%cl, %edi
	addl	%edx, %edi
	movl	%edi, (%rsi,%rbx,4)
	movl	%r11d, %ecx
	shll	%cl, %eax
	movl	4(%r14,%rbx,4), %edx
	movl	%r10d, %ecx
	shll	%cl, %edx
	addl	%eax, %edx
	movl	%edx, 4(%rsi,%rbx,4)
	addq	$2, %rbx
	cmpq	%rbx, %r13
	jne	LBB0_30
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%r13d, %r13d
	jle	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$8, %r13d
	jae	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_20
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movd	%r11d, %xmm0
	pmovzxdq	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,xmm0[1],zero
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_31
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rsi,%rcx,4), %xmm1
	movdqu	16(%rsi,%rcx,4), %xmm2
	movdqu	32(%rsi,%rcx,4), %xmm3
	movdqu	48(%rsi,%rcx,4), %xmm4
	pslld	%xmm0, %xmm1
	pslld	%xmm0, %xmm2
	movdqu	%xmm1, (%rsi,%rcx,4)
	movdqu	%xmm2, 16(%rsi,%rcx,4)
	pslld	%xmm0, %xmm3
	pslld	%xmm0, %xmm4
	movdqu	%xmm3, 32(%rsi,%rcx,4)
	movdqu	%xmm4, 48(%rsi,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rdx
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, -64(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movdqu	(%rsi,%rcx,4), %xmm1
	movdqu	16(%rsi,%rcx,4), %xmm2
	pslld	%xmm0, %xmm1
	pslld	%xmm0, %xmm2
	movdqu	%xmm1, (%rsi,%rcx,4)
	movdqu	%xmm2, 16(%rsi,%rcx,4)
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	cmpq	%r13, %rax
	je	LBB0_2
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r11d, %ecx
	shll	%cl, (%rsi,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %r13
	jne	LBB0_20
	jmp	LBB0_2
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movd	%r11d, %xmm0
	movd	%r10d, %xmm2
	pmovzxdq	%xmm0, %xmm1                    ## xmm1 = xmm0[0],zero,xmm0[1],zero
	pmovzxdq	%xmm2, %xmm0                    ## xmm0 = xmm2[0],zero,xmm2[1],zero
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_32
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rsi,%rcx,4), %xmm2
	movdqu	16(%rsi,%rcx,4), %xmm3
	movdqu	32(%rsi,%rcx,4), %xmm4
	movdqu	48(%rsi,%rcx,4), %xmm5
	pslld	%xmm1, %xmm2
	pslld	%xmm1, %xmm3
	movdqu	(%r14,%rcx,4), %xmm6
	movdqu	16(%r14,%rcx,4), %xmm7
	pslld	%xmm0, %xmm6
	pslld	%xmm0, %xmm7
	paddd	%xmm2, %xmm6
	paddd	%xmm3, %xmm7
	movdqu	%xmm6, (%rsi,%rcx,4)
	movdqu	%xmm7, 16(%rsi,%rcx,4)
	pslld	%xmm1, %xmm4
	pslld	%xmm1, %xmm5
	movdqu	32(%r14,%rcx,4), %xmm2
	movdqu	48(%r14,%rcx,4), %xmm3
	pslld	%xmm0, %xmm2
	paddd	%xmm4, %xmm2
	pslld	%xmm0, %xmm3
	paddd	%xmm5, %xmm3
	movdqu	%xmm2, 32(%rsi,%rcx,4)
	movdqu	%xmm3, 48(%rsi,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rbx
	jne	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, -64(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_26
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=1
	movdqu	(%rsi,%rcx,4), %xmm2
	movdqu	16(%rsi,%rcx,4), %xmm3
	pslld	%xmm1, %xmm2
	pslld	%xmm1, %xmm3
	movdqu	(%r14,%rcx,4), %xmm1
	movdqu	16(%r14,%rcx,4), %xmm4
	pslld	%xmm0, %xmm1
	pslld	%xmm0, %xmm4
	paddd	%xmm2, %xmm1
	paddd	%xmm3, %xmm4
	movdqu	%xmm1, (%rsi,%rcx,4)
	movdqu	%xmm4, 16(%rsi,%rcx,4)
LBB0_26:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r8
	cmpq	%r13, %rax
	je	LBB0_2
	jmp	LBB0_27
LBB0_31:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	testb	$1, -64(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_18
	jmp	LBB0_19
LBB0_32:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	testb	$1, -64(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_25
	jmp	LBB0_26
LBB0_33:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_chs_assemble_msbs_lsbs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chs_assemble_msbs_lsbs
_chs_assemble_msbs_lsbs:                ; @chs_assemble_msbs_lsbs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x22, #0
	sxtw	x8, w19
	ldr	x9, [x1, #8]
	add	x23, x9, x8, lsl #5
	ldr	w24, [x0]
	add	x25, x23, #24
	add	x26, x23, #8
	add	x27, x23, #16
	and	x28, x24, #0xfffffff0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.ge	LBB0_22
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
                                        ;     Child Loop BB0_18 Depth 2
                                        ;     Child Loop BB0_21 Depth 2
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	bl	_chs_get_lsb_width
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
	lsl	x9, x22, #3
	ldr	x8, [x8, x9]
	ldr	x10, [x25]
	ldr	x9, [x10, x9]
	cbz	x9, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #1
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x26]
	ldr	x10, [x9, x22, lsl #3]
	ldr	x9, [x27]
	ldr	w9, [x9, x22, lsl #2]
	cmp	w24, #16
	b.lo	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	x11, x24, #2
	add	x12, x8, x11
	add	x11, x10, x11
	cmp	x8, x11
	ccmp	x10, x12, #2, lo
	b.lo	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	dup.4s	v0, w0
	dup.4s	v1, w9
	add	x11, x10, #32
	add	x12, x8, #32
	mov	x13, x28
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q2, q3, [x12, #-32]
	ldp	q4, q5, [x12]
	ushl.4s	v2, v2, v0
	ushl.4s	v3, v3, v0
	ushl.4s	v4, v4, v0
	ushl.4s	v5, v5, v0
	ldp	q6, q7, [x11, #-32]
	ldp	q16, q17, [x11], #64
	ushl.4s	v6, v6, v1
	ushl.4s	v7, v7, v1
	ushl.4s	v16, v16, v1
	ushl.4s	v17, v17, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	add.4s	v4, v16, v4
	add.4s	v5, v17, v5
	stp	q2, q3, [x12, #-32]
	stp	q4, q5, [x12], #64
	subs	x13, x13, #16
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x11, x28
	cmp	x28, x24
	b.eq	LBB0_2
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #1
	b.lt	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #16
	b.hs	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, #0
	b	LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x11, #0
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	x12, x11, #2
	add	x10, x10, x12
	add	x8, x8, x12
	sub	x11, x24, x11
LBB0_16:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w12, [x8]
	ldr	w13, [x10], #4
	lsl	w12, w12, w0
	lsl	w13, w13, w9
	add	w12, w13, w12
	str	w12, [x8], #4
	subs	x11, x11, #1
	b.ne	LBB0_16
	b	LBB0_2
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	dup.4s	v0, w0
	add	x9, x8, #32
	mov	x10, x28
LBB0_18:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q1, q2, [x9, #-32]
	ldp	q3, q4, [x9]
	ushl.4s	v1, v1, v0
	ushl.4s	v2, v2, v0
	ushl.4s	v3, v3, v0
	ushl.4s	v4, v4, v0
	stp	q1, q2, [x9, #-32]
	stp	q3, q4, [x9], #64
	subs	x10, x10, #16
	b.ne	LBB0_18
; %bb.19:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, x28
	cmp	x28, x24
	b.eq	LBB0_2
LBB0_20:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, x9, lsl #2
	sub	x9, x24, x9
LBB0_21:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x8]
	lsl	w10, w10, w0
	str	w10, [x8], #4
	subs	x9, x9, #1
	b.ne	LBB0_21
	b	LBB0_2
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_chs_assemble_msbs_lsbs
.subsections_via_symbols
