	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_table
_encode_table:                          ## @encode_table
	.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	$3080, %rsp                     ## imm = 0xC08
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r15
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-3120(%rbp), %rdi
	movl	$3072, %esi                     ## imm = 0xC00
	callq	___bzero
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	leaq	-3120(%rbp), %rcx
	callq	_count_usage
	movl	$16, %eax
	movl	$254, %ecx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	-3132(%rbp,%rax)
	leal	1(%rcx), %edx
	movl	%edx, -3136(%rbp,%rax)
	incl	-3120(%rbp,%rax)
	movl	%ecx, -3124(%rbp,%rax)
	addq	$24, %rax
	addl	$-2, %ecx
	cmpq	$3088, %rax                     ## imm = 0xC10
	jne	LBB0_1
## %bb.2:
	leaq	-3120(%rbp), %rdi
	movq	%r14, %rsi
	movl	$256, %edx                      ## imm = 0x100
	movl	$12, %ecx
	callq	_magy_huffman_compute_bits
	movq	%r14, %rdi
	callq	_calculate_codes
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movl	(%r14,%rbx,4), %edx
	movq	%r15, %rdi
	movl	$7, %esi
	callq	_put_bits
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_3
## %bb.4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	addq	$3080, %rsp                     ## imm = 0xC08
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_table
_encode_table:                          ; @encode_table
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #3088
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	add	x24, sp, #8
	add	x0, sp, #8
	mov	w1, #3072
	bl	_bzero
	add	x3, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_count_usage
	add	x8, x24, #24
	mov	w9, #256
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w10, [x8, #-20]
	ldur	w11, [x8, #-8]
	ldr	w12, [x8, #4]
	ldr	w13, [x8, #16]
	add	w10, w10, #1
	add	w11, w11, #1
	add	w12, w12, #1
	add	w13, w13, #1
	sub	w14, w9, #1
	sub	w15, w9, #2
	stp	w14, w10, [x8, #-24]
	sub	w10, w9, #3
	subs	x9, x9, #4
	stp	w15, w11, [x8, #-12]
	stp	w10, w12, [x8]
	stp	w9, w13, [x8, #12]
	add	x8, x8, #48
	b.ne	LBB0_1
; %bb.2:
	add	x0, sp, #8
	mov	x1, x19
	mov	w2, #256
	mov	w3, #12
	bl	_magy_huffman_compute_bits
	mov	x0, x19
	bl	_calculate_codes
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	w2, [x19, x21]
	mov	x0, x20
	mov	w1, #7
	bl	_put_bits
	add	x21, x21, #4
	cmp	x21, #1024
	b.ne	LBB0_3
; %bb.4:
	ldur	x8, [x29, #-72]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	add	sp, sp, #3088
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_table
.subsections_via_symbols
