	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_simplestring_addn              ## -- Begin function simplestring_addn
	.p2align	4, 0x90
_simplestring_addn:                     ## @simplestring_addn
	.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
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_simplestring_init_str
LBB0_4:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	subq	%r14, %rcx
	movq	16(%rbx), %rax
	cmpq	%rax, %rcx
	jb	LBB0_18
## %bb.5:
	decq	%rcx
	cmpq	%rax, %rcx
	jb	LBB0_18
## %bb.6:
	leaq	(%r14,%rax), %r12
	incq	%r12
	movq	(%rbx), %rcx
	cmpq	%rcx, %r12
	jbe	LBB0_13
## %bb.7:
	addq	%rcx, %rcx
	je	LBB0_12
## %bb.8:
	movq	%r12, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_9
## %bb.10:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_11
LBB0_13:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_18
LBB0_9:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_11:
	movq	%r12, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	cmpq	%r12, %rax
	movq	%rax, %r12
	jb	LBB0_18
LBB0_12:
	movq	8(%rbx), %rdi
	movq	%r12, %rsi
	callq	_erealloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	cmoveq	%rax, %r12
	movq	%r12, (%rbx)
	testq	%rax, %rax
	je	LBB0_18
LBB0_15:
	testq	%r14, %r14
	je	LBB0_17
## %bb.16:
	addq	16(%rbx), %rax
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movq	8(%rbx), %rax
LBB0_17:
	addq	16(%rbx), %r14
	movq	%r14, 16(%rbx)
	movb	$0, (%rax,%r14)
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_simplestring_addn              ; -- Begin function simplestring_addn
	.p2align	2
_simplestring_addn:                     ; @simplestring_addn
	.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
	cbz	x0, LBB0_14
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_14
; %bb.2:
	mov	x19, x2
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_simplestring_init_str
LBB0_4:
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x8, [x20, #16]
	sub	x9, x9, x19
	cmp	x9, x8
	sub	x9, x9, #1
	ccmp	x9, x8, #0, hs
	b.lo	LBB0_14
; %bb.5:
	add	x8, x19, x8
	add	x8, x8, #1
	ldr	x9, [x20]
	cmp	x8, x9
	b.ls	LBB0_8
; %bb.6:
	lsl	x9, x9, #1
	cbz	x9, LBB0_9
; %bb.7:
	udiv	x10, x8, x9
	madd	x22, x10, x9, x9
	cmp	x22, x8
	b.hs	LBB0_10
	b	LBB0_14
LBB0_8:
	ldr	x0, [x20, #8]
	cbnz	x0, LBB0_11
	b	LBB0_14
LBB0_9:
	mov	x22, x8
LBB0_10:
	ldr	x0, [x20, #8]
	mov	x1, x22
	bl	_erealloc
	cmp	x0, #0
	csel	x8, xzr, x22, eq
	stp	x8, x0, [x20]
	cbz	x0, LBB0_14
LBB0_11:
	cbz	x19, LBB0_13
; %bb.12:
	ldr	x8, [x20, #16]
	add	x0, x0, x8
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	x0, [x20, #8]
LBB0_13:
	ldr	x8, [x20, #16]
	add	x8, x8, x19
	str	x8, [x20, #16]
	strb	wzr, [x0, x8]
LBB0_14:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
.subsections_via_symbols
