	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function addchars
_addchars:                              ## @addchars
	.cfi_startproc
## %bb.0:
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.1:
	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	%rsi, %r13
	movq	%rdi, %rdx
	movq	_current@GOTPCREL(%rip), %r12
	movslq	(%r12), %rcx
	leaq	(%rcx,%rsi), %rax
	movq	_bufsize@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rsi
	cmpq	%rsi, %rax
	jbe	LBB0_12
## %bb.2:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	_buffer@GOTPCREL(%rip), %r14
	movq	_SIZE_MAX@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1024, (%rbx)                   ## imm = 0x400
	movl	$1024, %esi                     ## imm = 0x400
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%edx, %edx
	callq	_xrealloc
	movl	%eax, (%r14)
	movslq	(%r12), %rcx
	leaq	(%rcx,%r13), %rdx
	movslq	(%rbx), %rsi
	cmpq	%rsi, %rdx
	jbe	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%esi, %esi
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %esi
	jle	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	leaq	L_.str(%rip), %rsi
	callq	_errx
	movl	(%rbx), %esi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addl	%esi, %esi
	movl	%esi, (%rbx)
	jmp	LBB0_8
LBB0_12:
	movq	_buffer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_9:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_10:
	addl	%ecx, %eax
	movl	%eax, %edi
	movq	%rdx, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	addl	%r13d, (%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
LBB0_11:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_bufsize,4,2                    ## @bufsize
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"size overflow"

	.comm	_buffer,4,2                     ## @buffer
	.no_dead_strip	_addchars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function addchars
_addchars:                              ; @addchars
	.cfi_startproc
; %bb.0:
	cbz	x1, LBB0_13
; %bb.1:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _current@GOTPAGE
Lloh1:
	ldr	x22, [x22, _current@GOTPAGEOFF]
	ldrsw	x8, [x22]
Lloh2:
	adrp	x23, _bufsize@GOTPAGE
Lloh3:
	ldr	x23, [x23, _bufsize@GOTPAGEOFF]
	ldrsw	x9, [x23]
	add	x10, x8, x1
	cmp	x10, x9
	b.ls	LBB0_10
; %bb.2:
Lloh4:
	adrp	x24, _buffer@GOTPAGE
Lloh5:
	ldr	x24, [x24, _buffer@GOTPAGEOFF]
Lloh6:
	adrp	x25, _SIZE_MAX@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SIZE_MAX@GOTPAGEOFF]
	mov	x8, x9
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w1, #1024
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w1, [x23]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x24]
	mov	x2, #0
	bl	_xrealloc
	str	w0, [x24]
	ldrsw	x9, [x22]
	ldrsw	x8, [x23]
	add	x10, x9, x19
	cmp	x10, x8
	b.ls	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x25]
	cmp	w9, #0
	cinc	w9, w9, lt
	cmp	w8, w9, asr #1
	b.le	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #1
	mov	x1, x21
	bl	_errx
	ldr	w1, [x23]
	b	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	lsl	w1, w8, #1
	b	LBB0_4
LBB0_10:
Lloh10:
	adrp	x9, _buffer@GOTPAGE
Lloh11:
	ldr	x9, [x9, _buffer@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x9]
	b	LBB0_12
LBB0_11:
	mov	x8, x9
LBB0_12:
	add	w0, w0, w8
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	ldr	w8, [x22]
	add	w8, w8, w19
	str	w8, [x22]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
LBB0_13:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_bufsize,4,2                    ; @bufsize
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"size overflow"

	.comm	_buffer,4,2                     ; @buffer
	.no_dead_strip	_addchars
.subsections_via_symbols
