	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_deflate_compress
_ng_deflate_compress:                   ## @ng_deflate_compress
	.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	%rdx, %r14
	movq	%rsi, %rbx
	callq	_NG_NODE_PRIVATE
	movq	%rax, %r13
	movq	$0, (%r14)
	movl	(%rbx), %r12d
	incl	40(%rax)
	addl	%r12d, 20(%rax)
	movq	_DEFLATE_BUF_SIZE@GOTPCREL(%rip), %r15
	cmpl	(%r15), %r12d
	jle	LBB0_2
## %bb.1:
	incl	32(%r13)
	movq	%rbx, %rdi
	callq	_NG_FREE_M
	jmp	LBB0_10
LBB0_2:
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_m_unshare
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %rbx
	movl	(%r13), %ecx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_m_copydata
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movslq	(%r15), %rbx
	movq	(%r13), %rax
	xorl	%ecx, %ecx
	cmpq	$0, (%rax)
	movq	8(%r13), %rdx
	sete	%cl
	leaq	(%rax,%rcx,8), %rax
	movl	%r12d, %esi
	subl	%ecx, %esi
	leaq	48(%r13), %rdi
	movq	%rax, 48(%r13)
	movl	%esi, 56(%r13)
	movq	_DEFLATE_HDRLEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rdx,%rax,4), %rcx
	addq	$8, %rcx
	movq	%rcx, 64(%r13)
	movl	%ebx, %ecx
	subl	%eax, %ecx
	addl	$-2, %ecx
	movl	%ecx, 72(%r13)
	movq	_Z_SYNC_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_deflate
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.4:
	movslq	72(%r13), %rax
	subq	%rax, %rbx
	leaq	-4(%rbx), %r15
	xorl	%edi, %edi
	cmpl	$5, %ebx
	setge	%dil
	callq	_MPASS
	movq	8(%r13), %rax
	xorl	%edi, %edi
	cmpl	$0, -16(%rax,%rbx,4)
	sete	%dil
	callq	_MPASS
	movq	8(%r13), %rax
	movslq	%ebx, %rbx
	xorl	%edi, %edi
	cmpl	$0, -12(%rax,%rbx,4)
	sete	%dil
	callq	_MPASS
	movq	8(%r13), %rax
	xorl	%edi, %edi
	cmpl	$255, -8(%rax,%rbx,4)
	sete	%dil
	callq	_MPASS
	movq	8(%r13), %rax
	xorl	%edi, %edi
	cmpl	$255, -4(%rax,%rbx,4)
	sete	%dil
	callq	_MPASS
	cmpl	%r12d, %r15d
	jle	LBB0_7
## %bb.5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14)
	movq	%r13, %rax
	addq	$36, %rax
	movl	%r12d, %r15d
	jmp	LBB0_16
LBB0_6:
	incl	32(%r13)
	movq	_LOG_NOTICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	76(%r13), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_log
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_NG_FREE_M
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	8(%r13), %rdi
	movq	_PROT_COMPD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_be16enc
	movq	8(%r13), %rdi
	addq	$8, %rdi
	movl	16(%r13), %esi
	callq	_be16enc
	movl	8(%r13), %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_m_copyback
	movl	%r15d, %esi
	subl	(%rbx), %esi
	jle	LBB0_13
## %bb.8:
	movq	%rbx, %rdi
	callq	_m_freem
LBB0_9:
	incl	32(%r13)
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	jge	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_m_adj
LBB0_15:
	movq	%rbx, (%r14)
	movq	%r13, %rax
	addq	$28, %rax
LBB0_16:
	incl	(%rax)
	addl	%r15d, 24(%r13)
	incl	16(%r13)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFLATE_BUF_SIZE,4,2           ## @DEFLATE_BUF_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_DEFLATE_HDRLEN,4,2             ## @DEFLATE_HDRLEN
	.comm	_Z_SYNC_FLUSH,4,2               ## @Z_SYNC_FLUSH
	.comm	_Z_OK,4,2                       ## @Z_OK
	.comm	_LOG_NOTICE,4,2                 ## @LOG_NOTICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ng_deflate: compression error: %d (%s)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PROT_COMPD,4,2                 ## @PROT_COMPD
	.no_dead_strip	_ng_deflate_compress
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_deflate_compress
_ng_deflate_compress:                   ; @ng_deflate_compress
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_NG_NODE_PRIVATE
	mov	x19, x0
	str	xzr, [x20]
	ldr	w22, [x21]
	ldr	w8, [x0, #40]
	add	w8, w8, #1
	str	w8, [x0, #40]
	ldr	w8, [x0, #20]
	add	w8, w8, w22
	str	w8, [x0, #20]
Lloh0:
	adrp	x23, _DEFLATE_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DEFLATE_BUF_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w22, w8
	b.le	LBB0_2
; %bb.1:
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	mov	x0, x21
	bl	_NG_FREE_M
	b	LBB0_10
LBB0_2:
Lloh2:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_m_unshare
	cbz	x0, LBB0_9
; %bb.3:
	mov	x21, x0
	ldr	w3, [x19]
	mov	w1, #0
	mov	x2, x22
	bl	_m_copydata
	ldrsw	x23, [x23]
	ldr	x8, [x19]
	ldr	x9, [x8]
	cmp	x9, #0
	cset	w9, eq
	add	x8, x8, w9, uxtw #3
	sub	w9, w22, w9
	mov	x0, x19
	str	x8, [x0, #48]!
	str	w9, [x0, #8]
	ldur	x8, [x0, #-40]
Lloh5:
	adrp	x9, _DEFLATE_HDRLEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DEFLATE_HDRLEN@GOTPAGEOFF]
Lloh7:
	ldrsw	x9, [x9]
	add	x8, x8, x9, lsl #2
	add	x8, x8, #8
	str	x8, [x0, #16]
	sub	w8, w23, w9
	sub	w8, w8, #2
	str	w8, [x0, #24]
Lloh8:
	adrp	x8, _Z_SYNC_FLUSH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Z_SYNC_FLUSH@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_deflate
Lloh11:
	adrp	x8, _Z_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _Z_OK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.4:
	ldrsw	x8, [x19, #72]
	sub	x24, x23, x8
	sub	x23, x24, #4
	cmp	w24, #4
	cset	w0, gt
	bl	_MPASS
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x23, lsl #2]
	cmp	w8, #0
	cset	w0, eq
	bl	_MPASS
	ldr	x8, [x19, #8]
	lsl	x24, x24, #2
	add	x8, x24, x8
	ldur	w8, [x8, #-12]
	cmp	w8, #0
	cset	w0, eq
	bl	_MPASS
	ldr	x8, [x19, #8]
	add	x8, x24, x8
	ldur	w8, [x8, #-8]
	cmp	w8, #255
	cset	w0, eq
	bl	_MPASS
	ldr	x8, [x19, #8]
	add	x8, x24, x8
	ldur	w8, [x8, #-4]
	cmp	w8, #255
	cset	w0, eq
	bl	_MPASS
	cmp	w23, w22
	b.le	LBB0_7
; %bb.5:
	str	x21, [x20]
	add	x8, x19, #36
	mov	x23, x22
	b	LBB0_16
LBB0_6:
	mov	x2, x0
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
Lloh14:
	adrp	x8, _LOG_NOTICE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LOG_NOTICE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w3, [x19, #76]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log
	mov	x0, x21
	bl	_NG_FREE_M
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	ldr	x0, [x19, #8]
Lloh21:
	adrp	x8, _PROT_COMPD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PROT_COMPD@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_be16enc
	ldr	x8, [x19, #8]
	add	x0, x8, #8
	ldr	w1, [x19, #16]
	bl	_be16enc
	ldr	w3, [x19, #8]
	mov	x0, x21
	mov	w1, #0
	mov	x2, x23
	bl	_m_copyback
	ldr	w8, [x21]
	subs	w1, w23, w8
	b.le	LBB0_13
; %bb.8:
	mov	x0, x21
	bl	_m_freem
LBB0_9:
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
LBB0_10:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	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_13:
	b.ge	LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_m_adj
LBB0_15:
	str	x21, [x20]
	add	x8, x19, #28
LBB0_16:
	mov	w0, #0
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	w8, [x19, #24]
	add	w8, w8, w23
	str	w8, [x19, #24]
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFLATE_BUF_SIZE,4,2           ; @DEFLATE_BUF_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_DEFLATE_HDRLEN,4,2             ; @DEFLATE_HDRLEN
	.comm	_Z_SYNC_FLUSH,4,2               ; @Z_SYNC_FLUSH
	.comm	_Z_OK,4,2                       ; @Z_OK
	.comm	_LOG_NOTICE,4,2                 ; @LOG_NOTICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ng_deflate: compression error: %d (%s)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PROT_COMPD,4,2                 ; @PROT_COMPD
	.no_dead_strip	_ng_deflate_compress
.subsections_via_symbols
