	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function append_data
_append_data:                           ## @append_data
	.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, %r15
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	jne	LBB0_3
## %bb.1:
	movq	$0, (%rbx)
	movq	__SEC_INIT_CAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 8(%rbx)
	callq	_malloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_3:
	movq	(%rbx), %rdi
	movq	8(%rbx), %rsi
	leaq	(%rdi,%r14), %rax
	cmpq	%rsi, %rax
	jbe	LBB0_8
## %bb.4:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %r13
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rdi
	movq	8(%rbx), %rsi
	leaq	(%rdi,%r14), %rax
	cmpq	%rsi, %rax
	jbe	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rsi, %rsi
	movq	%rsi, 8(%rbx)
	movq	16(%rbx), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_realloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_err
	jmp	LBB0_7
LBB0_8:
	shlq	$2, %rdi
	addq	16(%rbx), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	addq	%r14, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__SEC_INIT_CAP,8,3              ## @_SEC_INIT_CAP
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc failed"

L_.str.1:                               ## @.str.1
	.asciz	"realloc failed"

	.no_dead_strip	_append_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function append_data
_append_data:                           ; @append_data
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	cbnz	x8, LBB0_3
; %bb.1:
	str	xzr, [x20]
Lloh0:
	adrp	x8, __SEC_INIT_CAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, __SEC_INIT_CAP@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	str	x0, [x20, #8]
	bl	_malloc
	str	x0, [x20, #16]
	cbnz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_3:
	ldp	x8, x9, [x20]
	add	x10, x8, x19
	cmp	x10, x9
	b.ls	LBB0_8
; %bb.4:
Lloh8:
	adrp	x23, _EXIT_FAILURE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _EXIT_FAILURE@GOTPAGEOFF]
Lloh10:
	adrp	x22, l_.str.1@PAGE
Lloh11:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldp	x8, x9, [x20]
	add	x10, x8, x19
	cmp	x10, x9
	b.ls	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x1, x9, #1
	str	x1, [x20, #8]
	ldr	x0, [x20, #16]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_realloc
	str	x0, [x20, #16]
	cbnz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x23]
	mov	x1, x22
	bl	_err
	b	LBB0_5
LBB0_8:
	ldr	x9, [x20, #16]
	add	x0, x9, x8, lsl #2
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x20]
	add	x8, x8, x19
	str	x8, [x20]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	__SEC_INIT_CAP,8,3              ; @_SEC_INIT_CAP
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc failed"

l_.str.1:                               ; @.str.1
	.asciz	"realloc failed"

	.no_dead_strip	_append_data
.subsections_via_symbols
