	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function output
_output:                                ## @output
	.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
	movq	_offset@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%esi, %esi
	js	LBB0_19
## %bb.1:
	movq	_buf@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_n_bits@GOTPCREL(%rip), %r15
	movl	(%r15), %r8d
	movl	%ecx, %eax
	sarl	$3, %eax
	movslq	%eax, %r9
	andl	$7, %ecx
	movq	_rmask@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	movl	(%rbx,%rcx,4), %ebx
	movl	%esi, %edx
	shll	%cl, %edx
	andl	(%rdi,%r9,4), %ebx
	movq	_lmask@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andl	(%rax,%rcx,4), %edx
	orl	%ebx, %edx
	movl	%edx, (%rdi,%r9,4)
	leaq	(%rdi,%r9,4), %rbx
	addq	$4, %rbx
	movl	$8, %eax
	subl	%ecx, %eax
	subl	%eax, %r8d
	movl	%eax, %ecx
	shrl	%cl, %esi
	cmpl	$8, %r8d
	jl	LBB0_3
## %bb.2:
	movl	%esi, (%rbx)
	addq	$4, %rbx
	shrl	$8, %esi
	addl	$-8, %r8d
LBB0_3:
	testl	%r8d, %r8d
	je	LBB0_5
## %bb.4:
	movl	%esi, (%rbx)
LBB0_5:
	movl	(%r15), %ebx
	movl	(%r14), %ecx
	addl	%ebx, %ecx
	movl	%ecx, (%r14)
	leal	(,%rbx,8), %eax
	cmpl	%eax, %ecx
	jne	LBB0_8
## %bb.6:
	movq	_bytes_out@GOTPCREL(%rip), %rax
	addl	%ebx, (%rax)
	movq	_fp@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %esi
	movl	%ebx, %edx
	callq	_fwrite
	movl	%eax, %ecx
	movl	$-1, %eax
	cmpl	%ebx, %ecx
	jne	LBB0_24
## %bb.7:
	movl	$0, (%r14)
	xorl	%ecx, %ecx
LBB0_8:
	movq	_free_ent@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_maxcode@GOTPCREL(%rip), %r13
	xorl	%eax, %eax
	movq	_clear_flg@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	cmpq	(%r13), %rsi
	jg	LBB0_10
## %bb.9:
	testq	%rdx, %rdx
	jle	LBB0_24
LBB0_10:
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.11:
	movq	(%r12), %rdi
	movl	(%r15), %edx
	movq	_fp@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %esi
	callq	_fwrite
	movl	%eax, %ecx
	movl	$-1, %eax
	cmpl	(%r15), %ecx
	jne	LBB0_24
## %bb.12:
	movq	_bytes_out@GOTPCREL(%rip), %rax
	addl	%ecx, (%rax)
	movq	(%rbx), %rdx
LBB0_13:
	movl	$0, (%r14)
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.14:
	movq	_INIT_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%r15)
	callq	_MAXCODE
	movq	%rax, (%r13)
	movq	$0, (%rbx)
	jmp	LBB0_23
LBB0_19:
	testl	%ecx, %ecx
	jle	LBB0_22
## %bb.20:
	addl	$7, %ecx
	shrl	$3, %ecx
	movl	%ecx, (%r14)
	movq	_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_fp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %esi
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_fwrite
	movl	%eax, %ecx
	movl	$-1, %eax
	cmpl	(%r14), %ecx
	jne	LBB0_24
## %bb.21:
	movq	_bytes_out@GOTPCREL(%rip), %rax
	addl	%ecx, (%rax)
LBB0_22:
	movl	$0, (%r14)
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	(%r15), %edi
	incl	%edi
	movl	%edi, (%r15)
	movq	_maxbits@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_18
## %bb.16:
	movq	_maxmaxcode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	jmp	LBB0_23
LBB0_18:
	callq	_MAXCODE
	movq	%rax, (%r13)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_offset,4,2                     ## @offset
	.comm	_n_bits,4,2                     ## @n_bits
	.comm	_buf,8,3                        ## @buf
	.comm	_rmask,8,3                      ## @rmask
	.comm	_lmask,8,3                      ## @lmask
	.comm	_bytes_out,4,2                  ## @bytes_out
	.comm	_fp,4,2                         ## @fp
	.comm	_free_ent,8,3                   ## @free_ent
	.comm	_maxcode,8,3                    ## @maxcode
	.comm	_clear_flg,8,3                  ## @clear_flg
	.comm	_INIT_BITS,4,2                  ## @INIT_BITS
	.comm	_maxbits,4,2                    ## @maxbits
	.comm	_maxmaxcode,8,3                 ## @maxmaxcode
	.no_dead_strip	_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function output
_output:                                ; @output
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x20, _offset@GOTPAGE
Lloh1:
	ldr	x20, [x20, _offset@GOTPAGEOFF]
	ldr	w9, [x20]
	tbnz	w1, #31, LBB0_11
; %bb.1:
Lloh2:
	adrp	x22, _buf@GOTPAGE
Lloh3:
	ldr	x22, [x22, _buf@GOTPAGEOFF]
	ldr	x0, [x22]
Lloh4:
	adrp	x21, _n_bits@GOTPAGE
Lloh5:
	ldr	x21, [x21, _n_bits@GOTPAGEOFF]
	ldr	w10, [x21]
	asr	w8, w9, #3
	add	x8, x0, w8, sxtw #2
	and	x9, x9, #0x7
Lloh6:
	adrp	x11, _rmask@GOTPAGE
Lloh7:
	ldr	x11, [x11, _rmask@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	lsl	x12, x9, #2
	ldr	w11, [x11, x12]
	ldr	w13, [x8]
	and	w11, w11, w13
	lsl	w13, w1, w9
Lloh9:
	adrp	x14, _lmask@GOTPAGE
Lloh10:
	ldr	x14, [x14, _lmask@GOTPAGEOFF]
Lloh11:
	ldr	x14, [x14]
	ldr	w12, [x14, x12]
	and	w12, w12, w13
	orr	w11, w12, w11
	str	w11, [x8], #4
	mov	w11, #8
	sub	w9, w11, w9
	sub	w10, w10, w9
	lsr	w9, w1, w9
	subs	w11, w10, #8
	b.lt	LBB0_3
; %bb.2:
	str	w9, [x8], #4
	lsr	w9, w9, #8
	mov	x10, x11
LBB0_3:
	cbz	w10, LBB0_5
; %bb.4:
	str	w9, [x8]
LBB0_5:
	ldr	w19, [x21]
	ldr	w8, [x20]
	add	w8, w8, w19
	str	w8, [x20]
	cmp	w8, w19, lsl #3
	b.ne	LBB0_8
; %bb.6:
Lloh12:
	adrp	x8, _bytes_out@GOTPAGE
Lloh13:
	ldr	x8, [x8, _bytes_out@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w19
	str	w9, [x8]
Lloh14:
	adrp	x8, _fp@GOTPAGE
Lloh15:
	ldr	x8, [x8, _fp@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	w1, #1
	mov	x2, x19
	bl	_fwrite
	cmp	w0, w19
	b.ne	LBB0_20
; %bb.7:
	mov	w8, #0
	str	wzr, [x20]
LBB0_8:
Lloh17:
	adrp	x9, _free_ent@GOTPAGE
Lloh18:
	ldr	x9, [x9, _free_ent@GOTPAGEOFF]
Lloh19:
	adrp	x19, _maxcode@GOTPAGE
Lloh20:
	ldr	x19, [x19, _maxcode@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x9]
	ldr	x11, [x19]
Lloh22:
	adrp	x23, _clear_flg@GOTPAGE
Lloh23:
	ldr	x23, [x23, _clear_flg@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x10, x11
	b.gt	LBB0_15
; %bb.9:
	cmp	x9, #1
	b.ge	LBB0_15
; %bb.10:
	mov	w0, #0
	b	LBB0_21
LBB0_11:
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.12:
	add	w8, w9, #7
	lsr	w2, w8, #3
	str	w2, [x20]
Lloh24:
	adrp	x8, _buf@GOTPAGE
Lloh25:
	ldr	x8, [x8, _buf@GOTPAGEOFF]
Lloh26:
	ldr	x0, [x8]
Lloh27:
	adrp	x8, _fp@GOTPAGE
Lloh28:
	ldr	x8, [x8, _fp@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	w1, #1
	bl	_fwrite
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.13:
Lloh30:
	adrp	x8, _bytes_out@GOTPAGE
Lloh31:
	ldr	x8, [x8, _bytes_out@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w0
	str	w9, [x8]
LBB0_14:
	mov	w0, #0
	str	wzr, [x20]
	b	LBB0_21
LBB0_15:
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	ldr	x0, [x22]
	ldr	w2, [x21]
Lloh32:
	adrp	x8, _fp@GOTPAGE
Lloh33:
	ldr	x8, [x8, _fp@GOTPAGEOFF]
Lloh34:
	ldr	w3, [x8]
	mov	w1, #1
	bl	_fwrite
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.17:
Lloh35:
	adrp	x8, _bytes_out@GOTPAGE
Lloh36:
	ldr	x8, [x8, _bytes_out@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w0
	str	w9, [x8]
	ldr	x9, [x23]
LBB0_18:
	str	wzr, [x20]
	cbz	x9, LBB0_22
; %bb.19:
Lloh37:
	adrp	x8, _INIT_BITS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _INIT_BITS@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	str	w0, [x21]
	bl	_MAXCODE
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	str	xzr, [x23]
	b	LBB0_21
LBB0_20:
	mov	w0, #-1
LBB0_21:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_22:
	ldr	w8, [x21]
	add	w0, w8, #1
	str	w0, [x21]
Lloh40:
	adrp	x8, _maxbits@GOTPAGE
Lloh41:
	ldr	x8, [x8, _maxbits@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_24
; %bb.23:
	mov	w0, #0
Lloh43:
	adrp	x8, _maxmaxcode@GOTPAGE
Lloh44:
	ldr	x8, [x8, _maxmaxcode@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	b	LBB0_25
LBB0_24:
	bl	_MAXCODE
	mov	x8, x0
	mov	w0, #0
LBB0_25:
	str	x8, [x19]
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_offset,4,2                     ; @offset
	.comm	_n_bits,4,2                     ; @n_bits
	.comm	_buf,8,3                        ; @buf
	.comm	_rmask,8,3                      ; @rmask
	.comm	_lmask,8,3                      ; @lmask
	.comm	_bytes_out,4,2                  ; @bytes_out
	.comm	_fp,4,2                         ; @fp
	.comm	_free_ent,8,3                   ; @free_ent
	.comm	_maxcode,8,3                    ; @maxcode
	.comm	_clear_flg,8,3                  ; @clear_flg
	.comm	_INIT_BITS,4,2                  ; @INIT_BITS
	.comm	_maxbits,4,2                    ; @maxbits
	.comm	_maxmaxcode,8,3                 ; @maxmaxcode
	.no_dead_strip	_output
.subsections_via_symbols
