	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huffman_build_lookup_table     ## -- Begin function huffman_build_lookup_table
	.p2align	4, 0x90
_huffman_build_lookup_table:            ## @huffman_build_lookup_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_17
## %bb.1:
	movq	%rdi, %r14
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	(%r14), %rax
	cmpq	%rax, %r13
	jge	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
	movq	16(%r14), %r15
	movq	%r13, %rbx
	shlq	$4, %rbx
	movq	(%r15,%rbx), %rsi
	testq	%rsi, %rsi
	jle	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%rbx), %r12
	movl	%r13d, %edi
	callq	_MAKE_LOOKUP
	movl	4(%r14), %ecx
	subl	(%r12), %ecx
	movl	8(%r15,%rbx), %edx
	movl	%edx, %esi
	shll	%cl, %esi
	incl	%edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	cmpl	%edx, %esi
	jge	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %r11
	movslq	%edx, %r8
	leaq	-1(%r8), %rdx
	movslq	%esi, %r10
	leaq	(%r11,%r10,4), %rcx
	leaq	(,%r10,4), %rsi
	leaq	(%r11,%r10,4), %rdi
	addq	$4, %rdi
	leaq	(%r11,%rdx,4), %rdx
	incq	%rdx
	cmpq	%rdx, %rdi
	cmovaq	%rdi, %rdx
	movq	%r11, %r15
	notq	%r15
	addq	%rdx, %r15
	subq	%rsi, %r15
	cmpq	$28, %r15
	jb	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	shrq	$2, %r15
	incq	%r15
	movq	%r15, %r9
	andq	$-8, %r9
	movd	%eax, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%r9), %rdx
	movq	%rdx, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %r12d
	andl	$7, %r12d
	cmpq	$56, %rdx
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	jmp	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	andq	$-8, %rsi
	leaq	(%r11,%r10,4), %rdx
	addq	$240, %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -240(%rdx,%rdi,4)
	movdqu	%xmm0, -224(%rdx,%rdi,4)
	movdqu	%xmm0, -208(%rdx,%rdi,4)
	movdqu	%xmm0, -192(%rdx,%rdi,4)
	movdqu	%xmm0, -176(%rdx,%rdi,4)
	movdqu	%xmm0, -160(%rdx,%rdi,4)
	movdqu	%xmm0, -144(%rdx,%rdi,4)
	movdqu	%xmm0, -128(%rdx,%rdi,4)
	movdqu	%xmm0, -112(%rdx,%rdi,4)
	movdqu	%xmm0, -96(%rdx,%rdi,4)
	movdqu	%xmm0, -80(%rdx,%rdi,4)
	movdqu	%xmm0, -64(%rdx,%rdi,4)
	movdqu	%xmm0, -48(%rdx,%rdi,4)
	movdqu	%xmm0, -32(%rdx,%rdi,4)
	movdqu	%xmm0, -16(%rdx,%rdi,4)
	movdqu	%xmm0, (%rdx,%rdi,4)
	addq	$64, %rdi
	addq	$-8, %rsi
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r12, %r12
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	addq	%r10, %rdi
	leaq	(%r11,%rdi,4), %rdx
	addq	$16, %rdx
	shlq	$5, %r12
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -16(%rdx,%rsi)
	movdqu	%xmm0, (%rdx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %r12
	jne	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r9, %r15
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rcx,%r9,4), %rcx
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r11,%r8,4), %rdx
	addq	$-4, %rdx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, (%rcx)
	addq	$4, %rcx
	cmpq	%rdx, %rcx
	jbe	LBB0_15
	jmp	LBB0_16
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huffman_build_lookup_table     ; -- Begin function huffman_build_lookup_table
	.p2align	2
_huffman_build_lookup_table:            ; @huffman_build_lookup_table
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x0
	mov	x20, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.ge	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x8, [x19, #16]
	add	x21, x8, x20, lsl #4
	ldr	x1, [x21]
	cmp	x1, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_MAKE_LOOKUP
	ldr	w8, [x19, #4]
	ldr	w9, [x21]
	sub	w8, w8, w9
	ldr	w9, [x21, #8]
	lsl	w11, w9, w8
	add	w9, w9, #1
	lsl	w8, w9, w8
	cmp	w11, w8
	b.ge	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19, #8]
	sub	w10, w8, #1
	sxtw	x12, w10
	sbfiz	x13, x11, #2, #32
	add	x8, x9, x13
	add	x14, x8, #4
	add	x12, x9, x12, lsl #2
	add	x15, x12, #1
	cmp	x14, x15
	csinc	x12, x14, x12, hi
	mvn	x14, x9
	add	x12, x12, x14
	sub	x12, x12, x13
	cmp	x12, #60
	b.lo	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x13, w11
	lsr	x11, x12, #2
	add	x11, x11, #1
	and	x12, x11, #0x7ffffffffffffff0
	add	x8, x8, x12, lsl #2
	dup.4s	v0, w0
	add	x13, x9, x13, lsl #2
	add	x13, x13, #32
	mov	x14, x12
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	q0, q0, [x13, #-32]
	stp	q0, q0, [x13], #64
	subs	x14, x14, #16
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x11, x12
	b.eq	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, w10, sxtw #2
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w0, [x8], #4
	cmp	x8, x9
	b.ls	LBB0_10
	b	LBB0_2
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
