	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function pstrdup_escape_nul_bytes
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_pstrdup_escape_nul_bytes:              ## @pstrdup_escape_nul_bytes
	.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
	movq	%rdi, %r12
	testl	%esi, %esi
	jle	LBB0_27
## %bb.1:
	movl	%esi, %r14d
	movl	%esi, %r15d
	cmpl	$8, %esi
	jae	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_10
LBB0_3:
	movl	%r15d, %eax
	andl	$-8, %eax
	leaq	-8(%rax), %rsi
	movq	%rsi, %rcx
	shrq	$3, %rcx
	incq	%rcx
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.5:
	movq	%rcx, %rdi
	andq	$-2, %rdi
	pxor	%xmm2, %xmm2
	xorl	%esi, %esi
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [1,1,1,1]
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movd	(%r12,%rsi), %xmm4              ## xmm4 = mem[0],zero,zero,zero
	movd	4(%r12,%rsi), %xmm5             ## xmm5 = mem[0],zero,zero,zero
	pcmpeqb	%xmm2, %xmm4
	pmovzxbd	%xmm4, %xmm4                    ## xmm4 = xmm4[0],zero,zero,zero,xmm4[1],zero,zero,zero,xmm4[2],zero,zero,zero,xmm4[3],zero,zero,zero
	pand	%xmm3, %xmm4
	paddd	%xmm0, %xmm4
	pcmpeqb	%xmm2, %xmm5
	pmovzxbd	%xmm5, %xmm5                    ## xmm5 = xmm5[0],zero,zero,zero,xmm5[1],zero,zero,zero,xmm5[2],zero,zero,zero,xmm5[3],zero,zero,zero
	pand	%xmm3, %xmm5
	paddd	%xmm1, %xmm5
	movd	8(%r12,%rsi), %xmm0             ## xmm0 = mem[0],zero,zero,zero
	movd	12(%r12,%rsi), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	pcmpeqb	%xmm2, %xmm0
	pmovzxbd	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
	pand	%xmm3, %xmm0
	paddd	%xmm4, %xmm0
	pcmpeqb	%xmm2, %xmm1
	pmovzxbd	%xmm1, %xmm1                    ## xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero
	pand	%xmm3, %xmm1
	paddd	%xmm5, %xmm1
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_6
## %bb.7:
	testb	$1, %cl
	je	LBB0_9
LBB0_8:
	movd	(%r12,%rsi), %xmm2              ## xmm2 = mem[0],zero,zero,zero
	movd	4(%r12,%rsi), %xmm3             ## xmm3 = mem[0],zero,zero,zero
	pxor	%xmm4, %xmm4
	pcmpeqb	%xmm4, %xmm2
	pmovzxbd	%xmm2, %xmm2                    ## xmm2 = xmm2[0],zero,zero,zero,xmm2[1],zero,zero,zero,xmm2[2],zero,zero,zero,xmm2[3],zero,zero,zero
	movdqa	LCPI0_0(%rip), %xmm5            ## xmm5 = [1,1,1,1]
	pand	%xmm5, %xmm2
	paddd	%xmm2, %xmm0
	pcmpeqb	%xmm4, %xmm3
	pmovzxbd	%xmm3, %xmm2                    ## xmm2 = xmm3[0],zero,zero,zero,xmm3[1],zero,zero,zero,xmm3[2],zero,zero,zero,xmm3[3],zero,zero,zero
	pand	%xmm5, %xmm2
	paddd	%xmm2, %xmm1
LBB0_9:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	cmpq	%r15, %rax
	je	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$1, (%r12,%rax)
	adcl	$0, %ecx
	incq	%rax
	cmpq	%rax, %r15
	jne	LBB0_10
LBB0_11:
	testl	%ecx, %ecx
	je	LBB0_27
## %bb.12:
	leal	(%r14,%rcx,2), %esi
	incl	%esi
	movq	%rdx, %rdi
	callq	_apr_palloc
	cmpl	$1, %r14d
	jne	LBB0_14
## %bb.13:
	xorl	%edx, %edx
	movq	%rax, %rcx
LBB0_22:
	testb	$1, %r15b
	je	LBB0_26
## %bb.23:
	movb	(%r12,%rdx), %dl
	testb	%dl, %dl
	je	LBB0_25
## %bb.24:
	movb	%dl, (%rcx)
	incq	%rcx
	jmp	LBB0_26
LBB0_27:
	movq	%rdx, %rdi
	movq	%r12, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_apr_pstrdup                    ## TAILCALL
LBB0_14:
	movl	%r15d, %esi
	andl	$-2, %esi
	xorl	%edx, %edx
	movq	%rax, %rcx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=1
	movw	$12380, (%rcx)                  ## imm = 0x305C
	movb	$48, 2(%rcx)
	addq	$3, %rcx
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=1
	addq	$2, %rdx
	cmpq	%rdx, %rsi
	je	LBB0_22
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%r12,%rdx), %ebx
	testb	%bl, %bl
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movb	%bl, (%rcx)
	incq	%rcx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movw	$12380, (%rcx)                  ## imm = 0x305C
	movb	$48, 2(%rcx)
	addq	$3, %rcx
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	movzbl	1(%r12,%rdx), %ebx
	testb	%bl, %bl
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	movb	%bl, (%rcx)
	incq	%rcx
	jmp	LBB0_21
LBB0_4:
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	testb	$1, %cl
	jne	LBB0_8
	jmp	LBB0_9
LBB0_25:
	movw	$12380, (%rcx)                  ## imm = 0x305C
	movb	$48, 2(%rcx)
	addq	$3, %rcx
LBB0_26:
	movb	$0, (%rcx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_pstrdup_escape_nul_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pstrdup_escape_nul_bytes
_pstrdup_escape_nul_bytes:              ; @pstrdup_escape_nul_bytes
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cmp	w1, #1
	b.lt	LBB0_20
; %bb.1:
	mov	w20, w1
	cmp	w1, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x8, #0
	mov	w9, #0
	b	LBB0_12
LBB0_3:
	cmp	w1, #32
	b.hs	LBB0_5
; %bb.4:
	mov	w9, #0
	mov	x8, #0
	b	LBB0_9
LBB0_5:
	movi.2d	v0, #0000000000000000
	and	x8, x20, #0xffffffe0
	movi.4s	v1, #1
	add	x9, x19, #16
	movi.2d	v3, #0000000000000000
	mov	x10, x8
	movi.2d	v2, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
	movi.2d	v7, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v16, #0000000000000000
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q17, q18, [x9, #-16]
	cmeq.16b	v17, v17, #0
	ushll.8h	v19, v17, #0
	ushll.4s	v20, v19, #0
	and.16b	v20, v20, v1
	ushll2.4s	v19, v19, #0
	and.16b	v19, v19, v1
	ushll2.8h	v17, v17, #0
	ushll.4s	v21, v17, #0
	and.16b	v21, v21, v1
	ushll2.4s	v17, v17, #0
	and.16b	v17, v17, v1
	cmeq.16b	v18, v18, #0
	ushll.8h	v22, v18, #0
	ushll.4s	v23, v22, #0
	and.16b	v23, v23, v1
	ushll2.4s	v22, v22, #0
	and.16b	v22, v22, v1
	ushll2.8h	v18, v18, #0
	ushll.4s	v24, v18, #0
	and.16b	v24, v24, v1
	ushll2.4s	v18, v18, #0
	and.16b	v18, v18, v1
	add.4s	v4, v4, v17
	add.4s	v2, v2, v21
	add.4s	v3, v3, v19
	add.4s	v0, v0, v20
	add.4s	v16, v16, v18
	add.4s	v6, v6, v24
	add.4s	v7, v7, v22
	add.4s	v5, v5, v23
	add	x9, x9, #32
	subs	x10, x10, #32
	b.ne	LBB0_6
; %bb.7:
	add.4s	v1, v7, v3
	add.4s	v3, v16, v4
	add.4s	v0, v5, v0
	add.4s	v2, v6, v2
	add.4s	v0, v0, v2
	add.4s	v1, v1, v3
	add.4s	v0, v0, v1
	addv.4s	s0, v0
	fmov	w9, s0
	cmp	x8, x20
	b.eq	LBB0_14
; %bb.8:
	tst	x20, #0x18
	b.eq	LBB0_12
LBB0_9:
	mov	x10, x8
	and	x8, x20, #0xfffffff8
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w9
	add	x9, x19, x10
	sub	x10, x10, x8
	movi.4s	v2, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	d3, [x9], #8
	cmeq.8b	v3, v3, #0
	ushll.8h	v3, v3, #0
	ushll.4s	v4, v3, #0
	and.16b	v4, v4, v2
	ushll2.4s	v3, v3, #0
	and.16b	v3, v3, v2
	add.4s	v0, v0, v3
	add.4s	v1, v1, v4
	adds	x10, x10, #8
	b.ne	LBB0_10
; %bb.11:
	add.4s	v0, v1, v0
	addv.4s	s0, v0
	fmov	w9, s0
	cmp	x8, x20
	b.eq	LBB0_14
LBB0_12:
	add	x10, x19, x8
	sub	x8, x20, x8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x10], #1
	cmp	w11, #0
	cinc	w9, w9, eq
	subs	x8, x8, #1
	b.ne	LBB0_13
LBB0_14:
	cbz	w9, LBB0_20
; %bb.15:
	add	w8, w1, w9, lsl #1
	add	w1, w8, #1
	mov	x0, x2
	bl	_apr_palloc
	mov	w8, #12380
	mov	w9, #48
	mov	x10, x0
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	strh	w8, [x10]
	strb	w9, [x10, #2]
	add	x10, x10, #3
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x19, x19, #1
	subs	x20, x20, #1
	b.eq	LBB0_21
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x19]
	cbz	w11, LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	strb	w11, [x10], #1
	b	LBB0_17
LBB0_20:
	mov	x0, x2
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_apr_pstrdup
LBB0_21:
	strb	wzr, [x10]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_pstrdup_escape_nul_bytes
.subsections_via_symbols
