	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_quote_if_needed                ## -- Begin function quote_if_needed
	.p2align	4, 0x90
_quote_if_needed:                       ## @quote_if_needed
	.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	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	xorl	%edi, %edi
	testq	%r13, %r13
	setne	%dil
	callq	_Assert
	xorl	%edi, %edi
	testb	%r14b, %r14b
	setne	%dil
	callq	_Assert
	movq	%r13, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	addl	$3, %edi
	callq	_pg_malloc
	movq	%rax, %r15
	movb	%r14b, (%rax)
	movb	(%r13), %al
	testb	%al, %al
	je	LBB0_28
## %bb.1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	incq	%r15
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movb	(%r13), %al
	testb	%al, %al
	je	LBB0_27
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##     Child Loop BB0_18 Depth 2
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_26 Depth 2
	cmpb	%r14b, %al
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	%r14b, (%r15)
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpb	%cl, %al
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	%cl, (%r15)
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movl	$1, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movsbl	%al, %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_strchr
	testq	%rax, %rax
	movl	$1, %eax
	cmovnel	%eax, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_PQmblen
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rax), %ecx
	cmpl	$31, %ecx
	jb	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdx
	subq	%r13, %rdx
	cmpq	$32, %rdx
	jb	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	movq	%rcx, %r8
	andq	$-32, %r8
	leaq	-32(%r8), %rdx
	movq	%rdx, %rdi
	shrq	$5, %rdi
	incq	%rdi
	movl	%edi, %esi
	andl	$3, %esi
	cmpq	$96, %rdx
	jae	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	andq	$-4, %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r13,%rbx), %xmm0
	movups	16(%r13,%rbx), %xmm1
	movups	%xmm0, (%r15,%rbx)
	movups	%xmm1, 16(%r15,%rbx)
	movups	32(%r13,%rbx), %xmm0
	movups	48(%r13,%rbx), %xmm1
	movups	%xmm0, 32(%r15,%rbx)
	movups	%xmm1, 48(%r15,%rbx)
	movups	64(%r13,%rbx), %xmm0
	movups	80(%r13,%rbx), %xmm1
	movups	%xmm0, 64(%r15,%rbx)
	movups	%xmm1, 80(%r15,%rbx)
	movups	96(%r13,%rbx), %xmm0
	movups	112(%r13,%rbx), %xmm1
	movups	%xmm0, 96(%r15,%rbx)
	movups	%xmm1, 112(%r15,%rbx)
	subq	$-128, %rbx
	addq	$-4, %rdi
	jne	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r15,%rbx), %rdi
	addq	$16, %rdi
	addq	%r13, %rbx
	addq	$16, %rbx
	shlq	$5, %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rbx,%rdx), %xmm0
	movups	(%rbx,%rdx), %xmm1
	movups	%xmm0, -16(%rdi,%rdx)
	movups	%xmm1, (%rdi,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_18
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	%r8, %r13
	addq	%r8, %r15
	cmpq	%r8, %rcx
	je	LBB0_2
## %bb.20:                              ##   in Loop: Header=BB0_3 Depth=1
	subl	%r8d, %eax
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rax), %ecx
	testb	$7, %al
	je	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %esi
	andl	$7, %esi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r13,%rdx), %ebx
	movb	%bl, (%r15,%rdx)
	incq	%rdx
	cmpl	%edx, %esi
	jne	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	subl	%edx, %eax
	addq	%rdx, %r13
	addq	%rdx, %r15
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$7, %ecx
	jb	LBB0_2
	.p2align	4, 0x90
LBB0_26:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r13), %ecx
	movb	%cl, (%r15)
	movzbl	1(%r13), %ecx
	movb	%cl, 1(%r15)
	movzbl	2(%r13), %ecx
	movb	%cl, 2(%r15)
	movzbl	3(%r13), %ecx
	movb	%cl, 3(%r15)
	movzbl	4(%r13), %ecx
	movb	%cl, 4(%r15)
	movzbl	5(%r13), %ecx
	movb	%cl, 5(%r15)
	movzbl	6(%r13), %ecx
	movb	%cl, 6(%r15)
	movzbl	7(%r13), %ecx
	addq	$8, %r13
	movb	%cl, 7(%r15)
	addq	$8, %r15
	addl	$-8, %eax
	jne	LBB0_26
	jmp	LBB0_2
LBB0_27:
	movb	%r14b, (%r15)
	movb	$0, 1(%r15)
	testl	%r12d, %r12d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_30
	jmp	LBB0_29
LBB0_28:
	movb	%r14b, 1(%r15)
	movb	$0, 2(%r15)
LBB0_29:
	movq	%r15, %rdi
	callq	_free
	xorl	%r15d, %r15d
LBB0_30:
	movq	%r15, %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	_quote_if_needed                ; -- Begin function quote_if_needed
	.p2align	2
_quote_if_needed:                       ; @quote_if_needed
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x24, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_Assert
	cmp	w19, #0
	cset	w0, ne
	bl	_Assert
	mov	x0, x24
	bl	_strlen
	lsl	w8, w0, #1
	add	w0, w8, #3
	bl	_pg_malloc
	mov	x23, x0
	mov	x26, x0
	strb	w19, [x26], #1
	ldrb	w9, [x24]
	cbz	w9, LBB0_18
; %bb.1:
	mov	w25, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x27
	mov	x8, x24
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x8]
	mov	x24, x8
	cbz	w9, LBB0_17
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	and	w8, w9, #0xff
	cmp	w8, w19, uxtb
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	w19, [x26], #1
	mov	w25, #1
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, w21, uxtb
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	w21, [x26], #1
	mov	w25, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	sxtb	w1, w9
	mov	x0, x22
	bl	_strchr
	cmp	x0, #0
	csinc	w25, w25, wzr, eq
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x27, x26
	mov	x0, x24
	mov	x1, x20
	bl	_PQmblen
	cbz	w0, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w0, #1
	cmp	w8, #63
	b.lo	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	x9, x27, x24
	cmp	x9, #64
	b.lo	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x8, #1
	and	x10, x9, #0x1ffffffc0
	sub	w0, w0, w10
	add	x8, x24, x10
	add	x26, x27, x10
	add	x11, x24, #32
	add	x12, x27, #32
	mov	x13, x10
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x11, #-32]
	ldp	q2, q3, [x11], #64
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	subs	x13, x13, #64
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x9, x10
	b.ne	LBB0_16
	b	LBB0_3
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x24
	mov	x26, x27
LBB0_16:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x8], #1
	strb	w9, [x26], #1
	subs	w0, w0, #1
	b.ne	LBB0_16
	b	LBB0_3
LBB0_17:
	strb	w19, [x26]
	strb	wzr, [x26, #1]
	cbnz	w25, LBB0_20
	b	LBB0_19
LBB0_18:
	strb	w19, [x23, #1]
	strb	wzr, [x23, #2]
LBB0_19:
	mov	x0, x23
	bl	_free
	mov	x23, #0
LBB0_20:
	mov	x0, x23
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
