	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remap_codebooks
_remap_codebooks:                       ## @remap_codebooks
	.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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r10
	movq	_MAX_CBS_4x4@GOTPCREL(%rip), %r8
	movl	(%r8), %r11d
	cmpq	$1, %r10
	movl	%r11d, %edx
	adcl	$-1, %edx
	xorl	%r14d, %r14d
	movl	$0, %r15d
	testl	%edx, %edx
	jle	LBB0_5
## %bb.1:
	movq	56(%rsi), %r9
	xorl	%edx, %edx
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	cmpq	$1, %r10
	movl	%r11d, %eax
	adcl	$-1, %eax
	cltq
	cmpq	%rax, %rdx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r9,%rdx,8)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rsi), %rax
	movl	%r15d, (%rax,%rdx,4)
	movq	8(%rsi), %rax
	movslq	%r15d, %r15
	movl	%edx, (%rax,%r15,4)
	movq	48(%rsi), %rax
	movq	(%rdi), %rbx
	movq	(%rbx,%rdx,8), %rbx
	movq	(%rbx), %rcx
	incq	(%rax,%rcx,8)
	movq	8(%rbx), %rcx
	incq	(%rax,%rcx,8)
	movq	16(%rbx), %rcx
	incq	(%rax,%rcx,8)
	movq	24(%rbx), %rcx
	incq	(%rax,%rcx,8)
	incl	%r15d
	movq	8(%rdi), %r10
	movl	(%r8), %r11d
	jmp	LBB0_4
LBB0_5:
	movl	%r15d, 16(%rsi)
	movq	_MAX_CBS_2x2@GOTPCREL(%rip), %r8
	movl	(%r8), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.6:
	movq	48(%rsi), %rdx
	xorl	%edi, %edi
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%rdi
	movslq	%ecx, %rax
	cmpq	%rax, %rdi
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rdi,8)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	24(%rsi), %rax
	movl	%r14d, (%rax,%rdi,4)
	movq	32(%rsi), %rax
	movslq	%r14d, %r14
	movl	%edi, (%rax,%r14,4)
	incl	%r14d
	movl	(%r8), %ecx
	jmp	LBB0_9
LBB0_10:
	movl	%r14d, 40(%rsi)
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CBS_4x4,4,2                ## @MAX_CBS_4x4
	.comm	_MAX_CBS_2x2,4,2                ## @MAX_CBS_2x2
	.no_dead_strip	_remap_codebooks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remap_codebooks
_remap_codebooks:                       ; @remap_codebooks
	.cfi_startproc
; %bb.0:
	ldr	x12, [x0, #8]
	cmp	x12, #0
	cset	w9, ne
Lloh0:
	adrp	x8, _MAX_CBS_4x4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_CBS_4x4@GOTPAGEOFF]
	ldr	w13, [x8]
	sub	w9, w13, w9
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x10, #0
	mov	w9, #0
	ldr	x11, [x1, #56]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	cmp	x12, #0
	cset	w14, ne
	sub	w14, w13, w14
	cmp	x10, w14, sxtw
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x11, x10, lsl #3]
	cbz	x14, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x12, x13, [x1]
	str	w9, [x12, x10, lsl #2]
	str	w10, [x13, w9, sxtw #2]
	ldr	x12, [x1, #48]
	ldr	x13, [x0]
	ldr	x13, [x13, x10, lsl #3]
	ldr	x14, [x13]
	lsl	x14, x14, #3
	ldr	x15, [x12, x14]
	add	x15, x15, #1
	str	x15, [x12, x14]
	ldr	x14, [x13, #8]
	lsl	x14, x14, #3
	ldr	x15, [x12, x14]
	add	x15, x15, #1
	str	x15, [x12, x14]
	ldr	x14, [x13, #16]
	lsl	x14, x14, #3
	ldr	x15, [x12, x14]
	add	x15, x15, #1
	str	x15, [x12, x14]
	ldr	x13, [x13, #24]
	lsl	x13, x13, #3
	ldr	x14, [x12, x13]
	add	x14, x14, #1
	str	x14, [x12, x13]
	add	w9, w9, #1
	ldr	x12, [x0, #8]
	ldr	w13, [x8]
	b	LBB0_2
LBB0_5:
	mov	w9, #0
LBB0_6:
	str	w9, [x1, #16]
Lloh2:
	adrp	x8, _MAX_CBS_2x2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_CBS_2x2@GOTPAGEOFF]
	ldr	w12, [x8]
	cmp	w12, #1
	b.lt	LBB0_12
; %bb.7:
	mov	x10, #0
	mov	w9, #0
	ldr	x11, [x1, #48]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x10, x10, #1
	cmp	x10, w12, sxtw
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11, x10, lsl #3]
	cbz	x13, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldp	x12, x13, [x1, #24]
	str	w9, [x12, x10, lsl #2]
	str	w10, [x13, w9, sxtw #2]
	add	w9, w9, #1
	ldr	w12, [x8]
	b	LBB0_8
LBB0_11:
	str	w9, [x1, #40]
	ret
LBB0_12:
	str	wzr, [x1, #40]
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CBS_4x4,4,2                ; @MAX_CBS_4x4
	.comm	_MAX_CBS_2x2,4,2                ; @MAX_CBS_2x2
	.no_dead_strip	_remap_codebooks
.subsections_via_symbols
