	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_compressed_buffer
_write_compressed_buffer:               ## @write_compressed_buffer
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_RES_BUF_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -40(%rbp)
	callq	_xmalloc
	movq	%rax, %rbx
	movq	%rax, -56(%rbp)
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	$4, %edx
	callq	_bcopy
	addq	$4, %rbx
	movq	%rbx, -48(%rbp)
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	callq	_compress_start
	movq	8(%r12), %rdi
	movq	16(%r12), %rsi
	subq	%rdi, %rsi
	movq	%r15, %rdx
	callq	_compress_buffer
	movq	_compress_buffer@GOTPCREL(%rip), %rbx
	movq	_Z_FULL_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_compress_flush
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_strtab_write
	movq	%r15, %rdi
	callq	_compress_end
	movq	-56(%rbp), %rax
	movq	-48(%rbp), %rcx
	subq	%rax, %rcx
	movq	%rcx, (%r14)
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_BUF_CHUNK_SIZE,4,2         ## @RES_BUF_CHUNK_SIZE
	.comm	_Z_FULL_FLUSH,4,2               ## @Z_FULL_FLUSH
	.no_dead_strip	_write_compressed_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_compressed_buffer
_write_compressed_buffer:               ; @write_compressed_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _RES_BUF_CHUNK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RES_BUF_CHUNK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	w0, [sp, #24]
	bl	_xmalloc
	mov	x22, x0
	str	x0, [sp, #8]
	mov	x0, x21
	mov	x1, x22
	mov	w2, #4
	bl	_bcopy
	add	x8, x22, #4
	str	x8, [sp, #16]
	add	x0, sp, #8
	bl	_compress_start
	ldp	x0, x8, [x20, #8]
	sub	x1, x8, x0
	add	x2, sp, #8
	bl	_compress_buffer
Lloh3:
	adrp	x21, _compress_buffer@GOTPAGE
Lloh4:
	ldr	x21, [x21, _compress_buffer@GOTPAGEOFF]
Lloh5:
	adrp	x8, _Z_FULL_FLUSH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _Z_FULL_FLUSH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_compress_flush
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x21
	bl	_strtab_write
	add	x0, sp, #8
	bl	_compress_end
	ldp	x0, x8, [sp, #8]
	sub	x8, x8, x0
	str	x8, [x19]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_BUF_CHUNK_SIZE,4,2         ; @RES_BUF_CHUNK_SIZE
	.comm	_Z_FULL_FLUSH,4,2               ; @Z_FULL_FLUSH
	.no_dead_strip	_write_compressed_buffer
.subsections_via_symbols
