	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function strndup_quote
_strndup_quote:                         ## @strndup_quote
	.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
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%r15d, %eax
	cmovgel	%r15d, %eax
	leal	1(%rax), %edi
	callq	_malloc
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movb	(%r12), %dl
	testb	%dl, %dl
	je	LBB0_9
## %bb.3:
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.4:
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	movl	$1, %edi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	%r14b, %dl
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	%ecx, %rbx
	incl	%ecx
	movb	%dl, (%rax,%rbx)
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movzbl	(%r12,%rdi), %edx
	testb	%dl, %dl
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%rdi), %rbx
	cmpq	%rsi, %rdi
	movq	%rbx, %rdi
	jb	LBB0_5
LBB0_9:
	movslq	%ecx, %rcx
	movb	$0, (%rax,%rcx)
	jmp	LBB0_12
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_strndup_quote
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function strndup_quote
_strndup_quote:                         ; @strndup_quote
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_strlen
	cmp	w0, w20
	csel	w8, w0, w20, lt
	add	w0, w8, #1
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.2:
	mov	w8, #0
	ldrb	w9, [x19]
	cbz	w9, LBB0_8
; %bb.3:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w8, #0
	and	w10, w21, #0xff
	mov	w12, #1
	mov	w11, w20
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w9, [x19, x12]
	cmp	w9, #0
	ccmp	x12, x11, #2, ne
	add	x12, x12, #1
	b.hs	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, w10
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	strb	w9, [x0, w8, sxtw]
	add	w8, w8, #1
	b	LBB0_5
LBB0_8:
	strb	wzr, [x0, w8, sxtw]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_strndup_quote
.subsections_via_symbols
