	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function memory_write
_memory_write:                          ## @memory_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
	movq	(%rsi), %rax
	addq	%rax, %rcx
	cmpq	8(%rsi), %rcx
	jbe	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_4
LBB0_2:
	movq	%rsi, %rbx
	addq	16(%rsi), %rax
	movq	%rax, %rdi
	movq	%rdx, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movq	(%rbx), %rax
	addq	%r14, %rax
	movq	%rax, (%rbx)
	movq	24(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	movq	%rax, (%rcx)
LBB0_4:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Buffer exhausted"

	.comm	_ARCHIVE_FATAL,8,3              ## @ARCHIVE_FATAL
	.no_dead_strip	_memory_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function memory_write
_memory_write:                          ; @memory_write
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldp	x8, x9, [x1]
	add	x10, x8, x3
	cmp	x10, x9
	b.ls	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_archive_set_error
Lloh5:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
Lloh7:
	ldr	x19, [x8]
	b	LBB0_4
LBB0_2:
	mov	x19, x3
	mov	x20, x1
	ldr	x9, [x1, #16]
	add	x0, x9, x8
	mov	x1, x2
	mov	x2, x3
	bl	_memcpy
	ldr	x8, [x20]
	add	x8, x8, x19
	str	x8, [x20]
	ldr	x9, [x20, #24]
	cbz	x9, LBB0_4
; %bb.3:
	str	x8, [x9]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Buffer exhausted"

	.comm	_ARCHIVE_FATAL,8,3              ; @ARCHIVE_FATAL
	.no_dead_strip	_memory_write
.subsections_via_symbols
