	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function astrcat
_astrcat:                               ## @astrcat
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.4:
	cmpq	%rbx, _astrcat.oldstr(%rip)
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rax, %r13
	movq	%rax, _astrcat.offset(%rip)
	movq	%rbx, _astrcat.oldstr(%rip)
	jmp	LBB0_7
LBB0_1:
	movq	%r14, %rdi
	callq	_strdup
	movq	%rax, %rbx
	movq	%rax, (%r15)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_err
	movq	(%r15), %rbx
LBB0_3:
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rax, _astrcat.offset(%rip)
	jmp	LBB0_10
LBB0_5:
	movq	_astrcat.offset(%rip), %r13
LBB0_7:
	movq	%r14, %rdi
	callq	_strlen
	leaq	(%rax,%r13), %rcx
	incq	%rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r13), %r12
	addq	$2, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_realloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_err
	movq	_astrcat.offset(%rip), %r13
LBB0_9:
	movq	%rbx, (%r15)
	addq	%r13, %rbx
	movq	%r12, %rdx
	subq	%r13, %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strlcpy
	movq	_astrcat.offset(%rip), %rax
	movq	(%r15), %rdi
	addq	%rax, %rdi
	subq	%rax, %r12
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_strlcat
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, _astrcat.offset(%rip)
	movq	(%r15), %rbx
LBB0_10:
	movq	%rbx, _astrcat.oldstr(%rip)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_astrcat.offset,8,3 ## @astrcat.offset
.zerofill __DATA,__bss,_astrcat.oldstr,8,3 ## @astrcat.oldstr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"astrcat"

L_.str.1:                               ## @.str.1
	.asciz	"\n"

	.no_dead_strip	_astrcat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function astrcat
_astrcat:                               ; @astrcat
	.cfi_startproc
; %bb.0:
	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	x20, x1
	mov	x19, x0
	ldr	x21, [x0]
	adrp	x24, _astrcat.oldstr@PAGE
	cbz	x21, LBB0_3
; %bb.1:
	ldr	x8, [x24, _astrcat.oldstr@PAGEOFF]
	adrp	x25, _astrcat.offset@PAGE
	cmp	x8, x21
	b.eq	LBB0_6
; %bb.2:
	mov	x0, x21
	bl	_strlen
	mov	x23, x0
	str	x0, [x25, _astrcat.offset@PAGEOFF]
	str	x21, [x24, _astrcat.oldstr@PAGEOFF]
	b	LBB0_7
LBB0_3:
	mov	x0, x20
	bl	_strdup
	mov	x20, x0
	str	x0, [x19]
	cbnz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_err
	ldr	x20, [x19]
LBB0_5:
	mov	x0, x20
	bl	_strlen
	adrp	x8, _astrcat.offset@PAGE
	str	x0, [x8, _astrcat.offset@PAGEOFF]
	b	LBB0_10
LBB0_6:
	ldr	x23, [x25, _astrcat.offset@PAGEOFF]
LBB0_7:
	mov	x0, x20
	bl	_strlen
	add	x8, x23, x0
	add	x26, x8, #1
	add	x22, x8, #2
	mov	x0, x21
	mov	x1, x22
	bl	_realloc
	mov	x21, x0
	cbnz	x0, LBB0_9
; %bb.8:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_err
	ldr	x23, [x25, _astrcat.offset@PAGEOFF]
LBB0_9:
	str	x21, [x19]
	add	x0, x21, x23
	sub	x2, x22, x23
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strlcpy
	ldr	x8, [x19]
	ldr	x9, [x25, _astrcat.offset@PAGEOFF]
	add	x0, x8, x9
	sub	x2, x22, x9
	mov	x1, x20
	bl	_strlcat
	str	x26, [x25, _astrcat.offset@PAGEOFF]
	ldr	x20, [x19]
LBB0_10:
	str	x20, [x24, _astrcat.oldstr@PAGEOFF]
	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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_astrcat.offset,8,3 ; @astrcat.offset
.zerofill __DATA,__bss,_astrcat.oldstr,8,3 ; @astrcat.oldstr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"astrcat"

l_.str.1:                               ; @.str.1
	.asciz	"\n"

	.no_dead_strip	_astrcat
.subsections_via_symbols
