	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jsstr_concat                   ## -- Begin function jsstr_concat
	.p2align	4, 0x90
_jsstr_concat:                          ## @jsstr_concat
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_jsstr_length
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_jsstr_length
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	movl	%eax, %ebx
	addl	%r12d, %ebx
	movq	_JSSTR_SHORT_STRING_LENGTH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jb	LBB0_11
## %bb.3:
	movq	%r15, %rdi
	callq	_jsstr_is_rope
	xorl	%r13d, %r13d
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_jsstr_as_rope
	movl	(%rax), %ecx
LBB0_5:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_jsstr_is_rope
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_jsstr_as_rope
	movl	(%rax), %r13d
LBB0_7:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r13d
	cmoval	%r13d, %ecx
	movq	_JSSTR_MAX_ROPE_DEPTH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jae	LBB0_11
## %bb.8:
	movq	_JSSTR_MAX_LENGTH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	ja	LBB0_18
## %bb.16:
	movl	%ecx, %r13d
	movl	$24, %edi
	callq	_heap_alloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	%rax, %r12
	incl	%r13d
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, %r13
	addq	$4, %r13
	movq	_JSSTR_ROPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_jsstr_init
	movq	%r15, %rdi
	callq	_jsstr_addref
	movq	%rax, 16(%r12)
	movq	%r14, %rdi
	callq	_jsstr_addref
	movq	%rax, 8(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	jmp	LBB0_19
LBB0_10:
	movq	%r14, %rdi
	jmp	LBB0_14
LBB0_11:
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	callq	_jsstr_alloc_buf
	testq	%rax, %rax
	je	LBB0_18
## %bb.12:
	movq	%rax, %r13
	movq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_jsstr_flush
	movl	%r12d, %esi
	shlq	$2, %rsi
	addq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_jsstr_flush
	jmp	LBB0_19
LBB0_13:
	movq	%r15, %rdi
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_jsstr_addref                   ## TAILCALL
LBB0_18:
	xorl	%r13d, %r13d
LBB0_19:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JSSTR_SHORT_STRING_LENGTH,4,2  ## @JSSTR_SHORT_STRING_LENGTH
	.comm	_JSSTR_MAX_ROPE_DEPTH,4,2       ## @JSSTR_MAX_ROPE_DEPTH
	.comm	_JSSTR_MAX_LENGTH,4,2           ## @JSSTR_MAX_LENGTH
	.comm	_JSSTR_ROPE,4,2                 ## @JSSTR_ROPE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jsstr_concat                   ; -- Begin function jsstr_concat
	.p2align	2
_jsstr_concat:                          ; @jsstr_concat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_jsstr_length
	cbz	w0, LBB0_5
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_jsstr_length
	cbz	w0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _JSSTR_SHORT_STRING_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JSSTR_SHORT_STRING_LENGTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w22, w0, w21
	cmp	w22, w8
	b.lo	LBB0_16
; %bb.3:
	mov	x0, x20
	bl	_jsstr_is_rope
	cbz	x0, LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_jsstr_as_rope
	ldr	w23, [x0]
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	b	LBB0_7
LBB0_6:
	mov	x0, x20
LBB0_7:
	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
	add	sp, sp, #80
	b	_jsstr_addref
LBB0_8:
	mov	w23, #0
LBB0_9:
	mov	x0, x19
	bl	_jsstr_is_rope
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_jsstr_as_rope
	ldr	w8, [x0]
	b	LBB0_12
LBB0_11:
	mov	w8, #0
LBB0_12:
	cmp	w8, w23
	csel	w23, w8, w23, hi
Lloh3:
	adrp	x8, _JSSTR_MAX_ROPE_DEPTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _JSSTR_MAX_ROPE_DEPTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w23, w8
	b.hs	LBB0_16
; %bb.13:
Lloh6:
	adrp	x8, _JSSTR_MAX_LENGTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _JSSTR_MAX_LENGTH@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w22, w8
	b.hi	LBB0_18
; %bb.14:
	mov	w0, #24
	bl	_heap_alloc
	cbz	x0, LBB0_18
; %bb.15:
	mov	x21, x0
	add	w24, w23, #1
	add	x23, x0, #4
Lloh9:
	adrp	x8, _JSSTR_ROPE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JSSTR_ROPE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x22
	bl	_jsstr_init
	mov	x0, x20
	bl	_jsstr_addref
	str	x0, [x21, #16]
	mov	x0, x19
	bl	_jsstr_addref
	str	x0, [x21, #8]
	str	w24, [x21]
	b	LBB0_19
LBB0_16:
	add	x1, sp, #8
	mov	x0, x22
	bl	_jsstr_alloc_buf
	mov	x23, x0
	cbz	x0, LBB0_19
; %bb.17:
	ldr	x1, [sp, #8]
	mov	x0, x20
	bl	_jsstr_flush
	ldr	x8, [sp, #8]
	add	x1, x8, w21, uxtw #2
	mov	x0, x19
	bl	_jsstr_flush
	b	LBB0_19
LBB0_18:
	mov	x23, #0
LBB0_19:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_JSSTR_SHORT_STRING_LENGTH,4,2  ; @JSSTR_SHORT_STRING_LENGTH
	.comm	_JSSTR_MAX_ROPE_DEPTH,4,2       ; @JSSTR_MAX_ROPE_DEPTH
	.comm	_JSSTR_MAX_LENGTH,4,2           ; @JSSTR_MAX_LENGTH
	.comm	_JSSTR_ROPE,4,2                 ; @JSSTR_ROPE
.subsections_via_symbols
