	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_strnsubst                      ## -- Begin function strnsubst
	.p2align	4, 0x90
_strnsubst:                             ## @strnsubst
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_15
## %bb.1:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_strlen
	incq	%rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
LBB0_3:
	movl	$1, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_calloc
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_5:
	testq	%r15, %r15
	leaq	L_.str.1(%rip), %rax
	cmovneq	%r15, %rax
	testq	%r14, %r14
	je	LBB0_16
## %bb.6:
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_strlen
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_7
LBB0_16:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_strlcpy
	jmp	LBB0_13
LBB0_7:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	%rax, %r15
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_strlen
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_strlen
	movq	%r13, %r14
	movq	%rax, %r13
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_strlen
	movq	%rax, %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_strlen
	addq	-80(%rbp), %r13                 ## 8-byte Folded Reload
	addq	%rbx, %r13
	subq	%rax, %r13
	incq	%r13
	cmpq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	ja	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdx
	subq	%r12, %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_strncat
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcat
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rax, %r12
	addq	%r15, %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_strstr
	movq	%rax, %r15
	testq	%rax, %rax
	movq	%r14, %r13
	jne	LBB0_9
LBB0_12:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_strcat
LBB0_13:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_14:
	movq	%r13, (%rax)
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_strlcat
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, %r13
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"calloc"

L_.str.1:                               ## @.str.1
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_strnsubst                      ; -- Begin function strnsubst
	.p2align	2
_strnsubst:                             ; @strnsubst
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x21, [x0]
	cbz	x21, LBB0_15
; %bb.1:
	mov	x20, x3
	mov	x24, x2
	mov	x23, x1
	mov	x19, x0
	cbnz	x3, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_strlen
	mov	x23, #0
	add	x20, x0, #1
LBB0_3:
	mov	w0, #1
	mov	x1, x20
	bl	_calloc
	mov	x22, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_5:
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x24, #0
	csel	x24, x8, x24, eq
	cbz	x23, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_strlen
	cmp	x20, x0
	b.ne	LBB0_8
LBB0_7:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_strlcpy
	b	LBB0_14
LBB0_8:
	mov	x0, x21
	mov	x1, x23
	bl	_strstr
	cbz	x0, LBB0_12
; %bb.9:
	mov	x25, x0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_strlen
	mov	x26, x0
	mov	x0, x21
	bl	_strlen
	mov	x27, x0
	mov	x0, x24
	bl	_strlen
	mov	x28, x0
	mov	x0, x23
	bl	_strlen
	add	x8, x26, x27
	add	x8, x8, x28
	sub	x8, x8, x0
	add	x8, x8, #1
	cmp	x8, x20
	b.hi	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	x2, x25, x21
	mov	x0, x22
	mov	x1, x21
	bl	_strncat
	mov	x0, x22
	mov	x1, x24
	bl	_strcat
	mov	x0, x23
	bl	_strlen
	add	x21, x25, x0
	mov	x0, x21
	mov	x1, x23
	bl	_strstr
	mov	x25, x0
	cbnz	x0, LBB0_10
LBB0_12:
	mov	x0, x22
	mov	x1, x21
	bl	_strcat
	b	LBB0_14
LBB0_13:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_strlcat
LBB0_14:
	str	x22, [x19]
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"calloc"

l_.str.1:                               ; @.str.1
	.space	1

.subsections_via_symbols
