	.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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	_filedata@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rdx, %rax
	ja	LBB0_3
## %bb.1:
	movq	_filedatasize@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rcx, %rax
	cmpq	%r12, %rax
	jbe	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	addl	%r15d, 24(%rax)
	jmp	LBB0_7
LBB0_3:
	movl	$32, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r15, (%rbx)
	movq	%r15, %rdi
	callq	_malloc
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, 8(%rax)
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, (%r14)
	addq	$8, %r14
LBB0_6:
	movq	%rbx, (%r14)
	movq	$0, 8(%rbx)
LBB0_7:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_filedata,8,3                   ## @filedata
	.comm	_filedatasize,4,2               ## @filedatasize
	.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	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x3
	mov	x20, x1
Lloh0:
	adrp	x8, _filedata@GOTPAGE
Lloh1:
	ldr	x8, [x8, _filedata@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _filedatasize@GOTPAGE
Lloh4:
	ldr	x9, [x9, _filedatasize@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	add	x9, x8, x9
	cmp	x8, x2
	ccmp	x9, x2, #0, ls
	b.hi	LBB0_3
; %bb.1:
	mov	x22, x2
	mov	w0, #32
	bl	_malloc
	mov	x21, x0
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	x19, [x21]
	mov	x0, x19
	bl	_malloc
	str	x0, [x21, #16]
	mov	x1, x22
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.2:
	str	x21, [x8, #8]
	b	LBB0_5
LBB0_3:
	ldr	x8, [x20]
	ldr	w9, [x8, #24]
	add	w9, w9, w19
	str	w9, [x8, #24]
	b	LBB0_6
LBB0_4:
	str	x21, [x20], #8
LBB0_5:
	str	x21, [x20]
	str	xzr, [x21, #8]
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_filedata,8,3                   ; @filedata
	.comm	_filedatasize,4,2               ; @filedatasize
	.no_dead_strip	_memory_write
.subsections_via_symbols
