	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huffman_assign_canonical_codes ## -- Begin function huffman_assign_canonical_codes
	.p2align	4, 0x90
_huffman_assign_canonical_codes:        ## @huffman_assign_canonical_codes
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$144, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movl	$0, -16(%rbp)
	movl	(%rdi), %r10d
	testl	%r10d, %r10d
	jle	LBB0_1
## %bb.9:
	movq	8(%rdi), %r8
	movl	4(%rdi), %esi
	movq	%r10, %rcx
	shlq	$4, %rcx
	xorl	%eax, %eax
	movq	_HUFFERR_INTERNAL_INCONSISTENCY@GOTPCREL(%rip), %r9
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$16, %rax
	cmpq	%rax, %rcx
	je	LBB0_1
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r8,%rax), %rdx
	cmpl	%esi, %edx
	jg	LBB0_23
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$32, %edx
	jg	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	-144(%rbp,%rdx,4)
	jmp	LBB0_13
LBB0_1:
	xorl	%edx, %edx
	movl	$31, %esi
	movq	_HUFFERR_INTERNAL_INCONSISTENCY@GOTPCREL(%rip), %r9
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	sarl	%edx
	movl	%ecx, -144(%rbp,%rsi,4)
	addq	$-2, %rsi
	cmpl	$-1, %esi
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%rsi), %eax
	movl	-144(%rbp,%rax,4), %ecx
	addl	%edx, %ecx
	testb	$1, %cl
	jne	LBB0_23
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	sarl	%ecx
	movl	%edx, -144(%rbp,%rax,4)
	movl	-144(%rbp,%rsi,4), %edx
	addl	%ecx, %edx
	cmpl	$1, %esi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %eax
	andl	$-2, %eax
	cmpl	%edx, %eax
	je	LBB0_5
	jmp	LBB0_23
LBB0_6:
	movq	_HUFFERR_NONE@GOTPCREL(%rip), %r9
	testl	%r10d, %r10d
	jle	LBB0_23
## %bb.7:
	movq	8(%rdi), %r8
	cmpl	$1, %r10d
	jne	LBB0_14
## %bb.8:
	xorl	%esi, %esi
LBB0_20:
	testb	$1, %r10b
	je	LBB0_23
## %bb.21:
	shlq	$4, %rsi
	movl	(%r8,%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_23
## %bb.22:
	movslq	-144(%rbp,%rax,4), %rcx
	leal	1(%rcx), %edx
	movl	%edx, -144(%rbp,%rax,4)
	movq	%rcx, 8(%r8,%rsi)
LBB0_23:
	movl	(%r9), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-8(%rbp), %rcx
	jne	LBB0_25
## %bb.24:
	addq	$144, %rsp
	popq	%rbp
	retq
LBB0_14:
	movl	%r10d, %r11d
	andl	$-2, %r11d
	leaq	24(%r8), %rdx
	xorl	%esi, %esi
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=1
	addq	$2, %rsi
	addq	$32, %rdx
	cmpq	%rsi, %r11
	je	LBB0_20
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	-24(%rdx), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movslq	-144(%rbp,%rax,4), %rcx
	leal	1(%rcx), %edi
	movl	%edi, -144(%rbp,%rax,4)
	movq	%rcx, -16(%rdx)
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	-8(%rdx), %eax
	testl	%eax, %eax
	jle	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movslq	-144(%rbp,%rax,4), %rcx
	leal	1(%rcx), %edi
	movl	%edi, -144(%rbp,%rax,4)
	movq	%rcx, (%rdx)
	jmp	LBB0_19
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HUFFERR_INTERNAL_INCONSISTENCY,4,2 ## @HUFFERR_INTERNAL_INCONSISTENCY
	.comm	_HUFFERR_NONE,4,2               ## @HUFFERR_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huffman_assign_canonical_codes ; -- Begin function huffman_assign_canonical_codes
	.p2align	2
_huffman_assign_canonical_codes:        ; @huffman_assign_canonical_codes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
	str	wzr, [sp, #128]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #96]
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	ldr	w8, [x0]
	cmp	w8, #0
	b.le	LBB0_6
; %bb.1:
	ldr	x10, [x0, #8]
	ldr	w11, [x0, #4]
	mov	x12, sp
	mov	x13, x8
Lloh3:
	adrp	x9, _HUFFERR_INTERNAL_INCONSISTENCY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HUFFERR_INTERNAL_INCONSISTENCY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #16
	subs	x13, x13, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x14, [x10]
	cmp	w14, w11
	b.gt	LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w14, #32
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	x14, x14, #2
	ldr	w15, [x12, x14]
	add	w15, w15, #1
	str	w15, [x12, x14]
	b	LBB0_2
LBB0_6:
	mov	w10, #0
	mov	w13, #33
	mov	x11, sp
Lloh5:
	adrp	x9, _HUFFERR_INTERNAL_INCONSISTENCY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HUFFERR_INTERNAL_INCONSISTENCY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	str	w10, [x11, x12, lsl #2]
	asr	w10, w14, #1
	mov	x13, x12
	cmp	w12, #1
	b.ls	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sub	w12, w13, #1
	ldr	w14, [x11, w12, uxtw #2]
	add	w14, w14, w10
	cmp	w13, #2
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	and	w13, w14, #0xfffffffe
	cmp	w13, w14
	b.eq	LBB0_7
	b	LBB0_16
LBB0_10:
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	ldr	x9, [x0, #8]
	add	x10, x9, #8
	mov	x11, sp
Lloh7:
	adrp	x9, _HUFFERR_NONE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HUFFERR_NONE@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x10, x10, #16
	subs	x8, x8, #1
	b.eq	LBB0_16
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x10, #-8]
	cmp	w12, #1
	b.lt	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	lsl	x12, x12, #2
	ldrsw	x13, [x11, x12]
	add	w14, w13, #1
	str	w14, [x11, x12]
	str	x13, [x10]
	b	LBB0_12
LBB0_15:
Lloh9:
	adrp	x9, _HUFFERR_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HUFFERR_NONE@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x9]
	ldur	x8, [x29, #-8]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_HUFFERR_INTERNAL_INCONSISTENCY,4,2 ; @HUFFERR_INTERNAL_INCONSISTENCY
	.comm	_HUFFERR_NONE,4,2               ; @HUFFERR_NONE
.subsections_via_symbols
