	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_strcat_dup                     ## -- Begin function strcat_dup
	.p2align	4, 0x90
_strcat_dup:                            ## @strcat_dup
	.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
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%ebx, %ebx
	movl	$0, %r14d
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r14d
LBB0_2:
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_strlen
	movl	%eax, %ebx
LBB0_4:
	leal	(%rbx,%r14), %edi
	incl	%edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r13
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_memcpy
LBB0_8:
	leal	(%rbx,%r14), %r15d
	testl	%ebx, %ebx
	jle	LBB0_10
## %bb.9:
	movslq	%r14d, %rax
	movq	%r13, %rdi
	addq	%rax, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memcpy
LBB0_10:
	movslq	%r15d, %rax
	movb	$0, (%r13,%rax)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	$1, %eax
	je	LBB0_11
## %bb.12:
	cmpl	$3, %eax
	je	LBB0_14
## %bb.13:
	cmpl	$2, %eax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_15
	jmp	LBB0_16
LBB0_5:
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_11:
	movq	%r12, %rdi
	jmp	LBB0_15
LBB0_14:
	movq	%r12, %rdi
	callq	_R_FREE
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_15:
	callq	_R_FREE
LBB0_16:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_strcat_dup                     ; -- Begin function strcat_dup
	.p2align	2
_strcat_dup:                            ; @strcat_dup
	.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, x2
	mov	x19, x1
	mov	x21, x0
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_strlen
	mov	x23, x0
	cbz	x19, LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_strlen
	mov	x24, x0
	b	LBB0_5
LBB0_3:
	mov	w23, #0
	cbnz	x19, LBB0_2
LBB0_4:
	mov	w24, #0
LBB0_5:
	sxtw	x26, w23
	add	x25, x26, w24, sxtw
	add	w0, w25, #1
	bl	_malloc
	mov	x22, x0
	cbz	x0, LBB0_16
; %bb.6:
	cmp	w23, #1
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_memcpy
LBB0_8:
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.9:
	add	x0, x22, x26
	mov	x1, x19
	mov	x2, x24
	bl	_memcpy
LBB0_10:
	strb	wzr, [x22, x25]
	cmp	w20, #1
	b.eq	LBB0_13
; %bb.11:
	cmp	w20, #3
	b.eq	LBB0_14
; %bb.12:
	cmp	w20, #2
	b.eq	LBB0_15
	b	LBB0_16
LBB0_13:
	mov	x19, x21
	b	LBB0_15
LBB0_14:
	mov	x0, x21
	bl	_R_FREE
LBB0_15:
	mov	x0, x19
	bl	_R_FREE
LBB0_16:
	mov	x0, 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
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
