	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lzx_make_huffman_table
_lzx_make_huffman_table:                ## @lzx_make_huffman_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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r8
	movl	$32768, %ebx                    ## imm = 0x8000
	xorl	%esi, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, -128(%rbp,%rdx,4)
	movl	%ebx, -208(%rbp,%rdx,4)
	movl	(%r8,%rdx,4), %r9d
	movl	%r9d, %eax
	imull	%ebx, %eax
	addl	%ecx, %eax
	testl	%r9d, %r9d
	movl	%esi, %r9d
	cmovnel	%edx, %r9d
	movl	%ebx, %ecx
	shrl	%ecx
	movl	%eax, -124(%rbp,%rdx,4)
	movl	%ecx, -204(%rbp,%rdx,4)
	movl	4(%r8,%rdx,4), %r10d
	imull	%r10d, %ecx
	addl	%eax, %ecx
	leal	1(%rdx), %esi
	testl	%r10d, %r10d
	cmovel	%r9d, %esi
	shrl	$2, %ebx
	addq	$2, %rdx
	cmpq	$17, %rdx
	jne	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	testw	%cx, %cx
	jne	LBB0_33
## %bb.3:
	movl	8(%rdi), %edx
	cmpl	%edx, %esi
	jg	LBB0_33
## %bb.4:
	movl	%esi, 12(%rdi)
	cmpl	$15, %esi
	jg	LBB0_11
## %bb.5:
	testl	%esi, %esi
	jle	LBB0_11
## %bb.6:
	movl	$16, %ecx
	subl	%esi, %ecx
	movl	%esi, %r8d
	movl	$1, %ebx
	cmpl	$1, %esi
	je	LBB0_9
## %bb.7:
	movl	%r8d, %esi
	andl	$-2, %esi
	negq	%rsi
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%cl, -128(%rbp,%rbx,4)
	sarl	%cl, -208(%rbp,%rbx,4)
	sarl	%cl, -124(%rbp,%rbx,4)
	sarl	%cl, -204(%rbp,%rbx,4)
	leaq	(%rsi,%rbx), %rax
	addq	$2, %rax
	addq	$2, %rbx
	cmpq	$1, %rax
	jne	LBB0_8
LBB0_9:
	testb	$1, %r8b
	je	LBB0_11
## %bb.10:
	sarl	%cl, -128(%rbp,%rbx,4)
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, -208(%rbp,%rbx,4)
LBB0_11:
	movl	$1, %r15d
	movl	%edx, %ecx
	shll	%cl, %r15d
	movq	40(%rdi), %rbx
	movq	16(%rdi), %r10
	movl	24(%rdi), %r14d
	movq	$0, 32(%rdi)
	testl	%r14d, %r14d
	jle	LBB0_32
## %bb.12:
	xorl	%r12d, %r12d
	movq	%rbx, -216(%rbp)                ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r12
	cmpq	%r14, %r12
	je	LBB0_32
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_26 Depth 2
                                        ##     Child Loop BB0_30 Depth 2
	movzbl	(%r10,%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_31
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%eax, %eax
	cmpl	%ecx, %r15d
	jl	LBB0_33
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%ecx, %esi
	movslq	-128(%rbp,%rsi,4), %rcx
	movl	-208(%rbp,%rsi,4), %edx
	leal	(%rdx,%rcx), %edi
	movl	%edi, -128(%rbp,%rsi,4)
	cmpl	%r15d, %edi
	jg	LBB0_33
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	testl	%edx, %edx
	jle	LBB0_31
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	(%rbx,%rcx,8), %rax
	cmpl	$4, %edx
	jb	LBB0_29
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	-1(%rdx), %r8
	leal	-1(%rdx), %esi
	cmpl	%r8d, %esi
	jb	LBB0_29
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r8, %rsi
	shrq	$32, %rsi
	jne	LBB0_29
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%edx, %r11d
	andl	$-4, %r11d
	movq	%r12, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	leaq	-4(%r11), %rsi
	movq	%rsi, %rbx
	shrq	$2, %rbx
	incq	%rbx
	movl	%ebx, %r13d
	andl	$3, %r13d
	cmpq	$12, %rsi
	jae	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_24
LBB0_22:                                ##   in Loop: Header=BB0_13 Depth=1
	andq	$-4, %rbx
	movl	$4294967283, %ecx               ## imm = 0xFFFFFFF3
	leaq	(%rdx,%rcx), %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r8d, %r9d
	movdqu	%xmm0, -8(%rax,%r9,8)
	movdqu	%xmm0, -24(%rax,%r9,8)
	leal	8(%rdi), %ecx
	movdqu	%xmm0, -8(%rax,%rcx,8)
	movdqu	%xmm0, -24(%rax,%rcx,8)
	leal	4(%rdi), %ecx
	movdqu	%xmm0, -8(%rax,%rcx,8)
	movdqu	%xmm0, -24(%rax,%rcx,8)
	movl	%edi, %ecx
	movdqu	%xmm0, -8(%rax,%rcx,8)
	movdqu	%xmm0, -24(%rax,%rcx,8)
	addq	$16, %rsi
	addq	$-16, %rdi
	addq	$-16, %r8
	addq	$-4, %rbx
	jne	LBB0_23
LBB0_24:                                ##   in Loop: Header=BB0_13 Depth=1
	testq	%r13, %r13
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_13 Depth=1
	notq	%rsi
	addq	%rdx, %rsi
	.p2align	4, 0x90
LBB0_26:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%esi, %ecx
	movdqu	%xmm0, -8(%rax,%rcx,8)
	movdqu	%xmm0, -24(%rax,%rcx,8)
	addq	$-4, %rsi
	decq	%r13
	jne	LBB0_26
LBB0_27:                                ##   in Loop: Header=BB0_13 Depth=1
	cmpq	%rdx, %r11
	movq	-216(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_31
## %bb.28:                              ##   in Loop: Header=BB0_13 Depth=1
	andl	$3, %edx
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rdx
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	-2(%rdx), %ecx
	movq	%r12, (%rax,%rcx,8)
	decq	%rdx
	cmpq	$1, %rdx
	ja	LBB0_30
	jmp	LBB0_31
LBB0_32:
	movl	$1, %eax
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_35
## %bb.34:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lzx_make_huffman_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function lzx_make_huffman_table
lCPI0_0:
	.long	32768                           ; 0x8000
	.long	16384                           ; 0x4000
	.long	8192                            ; 0x2000
	.long	4096                            ; 0x1000
lCPI0_1:
	.long	2048                            ; 0x800
	.long	1024                            ; 0x400
	.long	512                             ; 0x200
	.long	256                             ; 0x100
lCPI0_2:
	.long	128                             ; 0x80
	.long	64                              ; 0x40
	.long	32                              ; 0x20
	.long	16                              ; 0x10
lCPI0_3:
	.long	8                               ; 0x8
	.long	4                               ; 0x4
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_lzx_make_huffman_table:                ; @lzx_make_huffman_table
	.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
	mov	w8, #0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-8]
	ldr	x9, [x0]
	ldp	w10, w11, [x9, #4]
	cmp	w10, #0
	cset	w12, ne
	lsl	w10, w10, #15
	stp	wzr, w10, [sp, #72]
	add	w10, w10, w11, lsl #14
	mov	w13, #2
	cmp	w11, #0
	csel	w11, w12, w13, eq
	ldp	w12, w13, [x9, #12]
	add	w14, w10, w12, lsl #13
	mov	w15, #3
	cmp	w12, #0
	csel	w11, w11, w15, eq
	stp	w10, w14, [sp, #80]
Lloh3:
	adrp	x10, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x10, lCPI0_0@PAGEOFF]
	stur	q0, [sp, #4]
	add	w10, w14, w13, lsl #12
	mov	w12, #4
	cmp	w13, #0
	csel	w11, w11, w12, eq
	ldp	w12, w13, [x9, #20]
	add	w14, w10, w12, lsl #11
	mov	w15, #5
	cmp	w12, #0
	csel	w11, w11, w15, eq
	stp	w10, w14, [sp, #88]
	add	w10, w14, w13, lsl #10
	mov	w12, #6
	cmp	w13, #0
	csel	w11, w11, w12, eq
	ldp	w12, w13, [x9, #28]
	add	w14, w10, w12, lsl #9
	mov	w15, #7
	cmp	w12, #0
	csel	w11, w11, w15, eq
	stp	w10, w14, [sp, #96]
Lloh5:
	adrp	x10, lCPI0_1@PAGE
Lloh6:
	ldr	q0, [x10, lCPI0_1@PAGEOFF]
	stur	q0, [sp, #20]
	add	w10, w14, w13, lsl #8
	mov	w12, #8
	cmp	w13, #0
	csel	w11, w11, w12, eq
	ldp	w12, w13, [x9, #36]
	add	w14, w10, w12, lsl #7
	mov	w15, #9
	cmp	w12, #0
	csel	w11, w11, w15, eq
	stp	w10, w14, [sp, #104]
	add	w10, w14, w13, lsl #6
	mov	w12, #10
	cmp	w13, #0
	csel	w11, w11, w12, eq
	ldp	w12, w13, [x9, #44]
	add	w14, w10, w12, lsl #5
	mov	w15, #11
	cmp	w12, #0
	csel	w11, w11, w15, eq
	stp	w10, w14, [sp, #112]
Lloh7:
	adrp	x10, lCPI0_2@PAGE
Lloh8:
	ldr	q0, [x10, lCPI0_2@PAGEOFF]
	add	w10, w14, w13, lsl #4
	mov	w12, #12
	cmp	w13, #0
	csel	w11, w11, w12, eq
	mov	w12, #13
	ldp	w13, w14, [x9, #52]
	cmp	w13, #0
	csel	w11, w11, w12, eq
	add	w12, w10, w13, lsl #3
	stp	w10, w12, [sp, #120]
	add	w10, w12, w14, lsl #2
	mov	w12, #14
	cmp	w14, #0
	csel	w11, w11, w12, eq
	mov	w12, #15
	ldp	w13, w9, [x9, #60]
	cmp	w13, #0
	csel	w11, w11, w12, eq
	stur	q0, [sp, #36]
	add	w12, w10, w13, lsl #1
	stp	w10, w12, [sp, #128]
Lloh9:
	adrp	x10, lCPI0_3@PAGE
Lloh10:
	ldr	q0, [x10, lCPI0_3@PAGEOFF]
	stur	q0, [sp, #52]
	add	w10, w9, w12
	mov	w12, #16
	cmp	w9, #0
	csel	w9, w11, w12, eq
	tst	w10, #0xffff
	b.ne	LBB0_23
; %bb.1:
	ldr	w13, [x0, #8]
	cmp	w9, w13
	b.le	LBB0_3
LBB0_2:
	mov	w8, #0
	b	LBB0_23
LBB0_3:
	str	w9, [x0, #12]
	cmp	w9, #15
	b.hi	LBB0_7
; %bb.4:
	cbz	w9, LBB0_7
; %bb.5:
	mov	w8, #16
	sub	w8, w8, w9
	add	w11, w9, #1
	mov	x9, sp
	add	x9, x9, #4
	add	x10, sp, #68
	add	x10, x10, #4
	sub	x11, x11, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10]
	asr	w12, w12, w8
	str	w12, [x10], #4
	ldr	w12, [x9]
	asr	w12, w12, w8
	str	w12, [x9], #4
	subs	x11, x11, #1
	b.ne	LBB0_6
LBB0_7:
	mov	w8, #1
	ldr	x9, [x0, #40]
	ldr	x10, [x0, #16]
	ldr	w11, [x0, #24]
	str	xzr, [x0, #32]
	cmp	w11, #1
	b.lt	LBB0_23
; %bb.8:
	mov	x12, #0
	lsl	w8, w8, w13
	add	x13, sp, #68
	mov	x14, sp
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x12, x12, #1
	cmp	x12, x11
	b.eq	LBB0_22
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
                                        ;     Child Loop BB0_18 Depth 2
	ldrb	w15, [x10, x12]
	cbz	w15, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w8, w15
	b.lt	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	lsl	x17, x15, #2
	ldrsw	x15, [x13, x17]
	ldr	w16, [x14, x17]
	add	w0, w16, w15
	cmp	w0, w8
	str	w0, [x13, x17]
	b.gt	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w16, #1
	b.lt	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x15, x9, x15, lsl #3
	cmp	w16, #8
	b.lo	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	x0, x16, #1
	sub	w17, w16, #1
	cmp	w17, w0
	lsr	x17, x0, #32
	ccmp	x17, #0, #0, hs
	b.eq	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x17, x16
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	add	x16, x17, #1
LBB0_18:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w17, w16, #2
	str	x12, [x15, w17, uxtw #3]
	sub	x16, x16, #1
	cmp	x16, #1
	b.hi	LBB0_18
	b	LBB0_9
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=1
	and	x1, x16, #0xfffffff8
	and	x17, x16, #0x7
	dup.2d	v0, x12
	mov	x2, x1
LBB0_20:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x3, x15, w0, uxtw #3
	stur	q0, [x3, #-8]
	stur	q0, [x3, #-24]
	stur	q0, [x3, #-40]
	stur	q0, [x3, #-56]
	sub	x0, x0, #8
	subs	x2, x2, #8
	b.ne	LBB0_20
; %bb.21:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	x1, x16
	b.eq	LBB0_9
	b	LBB0_17
LBB0_22:
	mov	w8, #1
LBB0_23:
	ldur	x9, [x29, #-8]
Lloh11:
	adrp	x10, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x10, [x10, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x10, x9
	b.ne	LBB0_25
; %bb.24:
	mov	x0, x8
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdr	Lloh7, Lloh8
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lzx_make_huffman_table
.subsections_via_symbols
