	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_codes
_gen_codes:                             ## @gen_codes
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_BITS@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	leal	1(%r12), %ebx
	leaq	(,%rbx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	$-1, %eax
	movl	$-1, %edx
	testq	%r12, %r12
	jle	LBB0_8
## %bb.1:
	movl	%ebx, %ecx
	decq	%rbx
	cmpl	$2, %ecx
	jne	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	movl	$1, %ecx
	jmp	LBB0_5
LBB0_3:
	movq	%rbx, %rsi
	andq	$-2, %rsi
	negq	%rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addl	-4(%r15,%rcx,4), %edx
	addl	%edx, %edx
	movl	%edx, (%r14,%rcx,4)
	addl	(%r15,%rcx,4), %edx
	addl	%edx, %edx
	movl	%edx, 4(%r14,%rcx,4)
	leaq	(%rsi,%rcx), %rdi
	addq	$2, %rdi
	addq	$2, %rcx
	cmpq	$1, %rdi
	jne	LBB0_4
LBB0_5:
	testb	$1, %bl
	je	LBB0_7
## %bb.6:
	addl	-4(%r15,%rcx,4), %edx
	addl	%edx, %edx
	movl	%edx, (%r14,%rcx,4)
LBB0_7:
	decl	%edx
LBB0_8:
	addl	(%r15,%r12,4), %edx
	movl	%r12d, %ecx
	shll	%cl, %eax
	notl	%eax
	xorl	%edi, %edi
	cmpl	%eax, %edx
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_Assert
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edi
	callq	_Tracev
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	%rbx, -56(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r13,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r14,%rsi,4), %r15d
	leal	1(%r15), %eax
	movl	%eax, (%r14,%rsi,4)
	movl	%r15d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bi_reverse
	movl	%eax, 4(%r13,%rbx,8)
	xorl	%r12d, %r12d
	movq	_static_ltree@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	setne	%r12b
	movl	%ebx, %edi
	callq	_isgraph
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_Tracecv
	jmp	LBB0_12
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BITS,4,2                   ## @MAX_BITS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"inconsistent bit counts"

	.comm	_stderr,4,2                     ## @stderr
	.comm	_static_ltree,8,3               ## @static_ltree
	.no_dead_strip	_gen_codes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_codes
_gen_codes:                             ; @gen_codes
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _MAX_BITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_BITS@GOTPAGEOFF]
Lloh5:
	ldrsw	x12, [x8]
	add	w13, w12, #1
	lsl	x8, x13, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	mov	w8, #-1
	cmp	w12, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w9, #0
	add	x10, x23, #4
	sub	x11, x13, #1
	mov	x13, x2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x13], #4
	add	w9, w14, w9
	lsl	w9, w9, #1
	str	w9, [x10], #4
	subs	x11, x11, #1
	b.ne	LBB0_2
; %bb.3:
	sub	w9, w9, #1
	b	LBB0_5
LBB0_4:
	mov	w9, #-1
LBB0_5:
	ldr	w10, [x2, x12, lsl #2]
	lsl	w8, w8, w12
	mvn	w8, w8
	add	w9, w9, w10
	cmp	w9, w8
	cset	w0, eq
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Assert
	mov	x0, x20
	bl	_Tracev
	tbnz	w20, #31, LBB0_10
; %bb.6:
	mov	x21, #0
	add	w24, w20, #1
	add	x25, x19, #4
Lloh10:
	adrp	x26, _static_ltree@GOTPAGE
Lloh11:
	ldr	x26, [x26, _static_ltree@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #1
	add	x25, x25, #8
	cmp	x24, x21
	b.eq	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldursw	x1, [x25, #-4]
	cbz	w1, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	x8, x1, #2
	ldr	w20, [x23, x8]
	add	w9, w20, #1
	str	w9, [x23, x8]
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_bi_reverse
	str	w0, [x25]
	ldr	x8, [x26]
	cmp	x8, x19
	cset	w22, ne
	mov	x0, x21
	bl	_isgraph
	mov	x0, x22
	mov	x1, x20
	bl	_Tracecv
	b	LBB0_7
LBB0_10:
	ldur	x8, [x29, #-72]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #64
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BITS,4,2                   ; @MAX_BITS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"inconsistent bit counts"

	.comm	_stderr,4,2                     ; @stderr
	.comm	_static_ltree,8,3               ; @static_ltree
	.no_dead_strip	_gen_codes
.subsections_via_symbols
