	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PQescapeStringInternal
_PQescapeStringInternal:                ## @PQescapeStringInternal
	.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
	movl	%r9d, -64(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movl	$0, (%r8)
LBB0_2:
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_25
## %bb.3:
	xorl	%eax, %eax
	cmpl	$0, 16(%rbp)
	sete	%al
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_4
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %r13
	addq	%rbx, %r14
	movq	%rax, %r12
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r15d, %ebx
	jl	LBB0_18
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	testq	%r12, %r12
	je	LBB0_25
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movb	(%r13), %bl
	testb	%bl, %bl
	je	LBB0_25
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movsbl	%bl, %r15d
	movl	%r15d, %edi
	callq	_IS_HIGHBIT_SET
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	callq	_pg_encoding_mblen
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rax
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r13,%rbx), %ecx
	testb	%cl, %cl
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movb	%cl, (%r14,%rbx)
	leaq	-1(%rax), %r12
	incq	%rbx
	cmpl	%r15d, %ebx
	jge	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	cmpq	$1, %rax
	movq	%r12, %rax
	jne	LBB0_12
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %r13
	addq	%rbx, %r14
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_SQL_STR_DOUBLE
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movb	%bl, (%r14)
	incq	%r14
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movb	%bl, (%r14)
	incq	%r14
	incq	%r13
	decq	%r12
	jmp	LBB0_9
LBB0_18:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movl	$1, (%rax)
LBB0_20:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	je	LBB0_22
## %bb.21:
	leaq	L_.str(%rip), %rdi
	callq	_libpq_gettext
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_printfPQExpBuffer
LBB0_22:
	subl	%ebx, %r15d
	movq	%r14, %rax
	subq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rcx
	shrq	%rcx
	cmpq	-56(%rbp), %rcx                 ## 8-byte Folded Reload
	jae	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movb	$32, (%r14)
	incq	%r14
	incq	%rax
	decl	%r15d
	jne	LBB0_23
LBB0_25:
	movb	$0, (%r14)
	subq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"incomplete multibyte character\n"

	.no_dead_strip	_PQescapeStringInternal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PQescapeStringInternal
_PQescapeStringInternal:                ; @PQescapeStringInternal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x5
	mov	x22, x4
	mov	x20, x3
	mov	x24, x2
	mov	x19, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	cbz	x4, LBB0_2
; %bb.1:
	str	wzr, [x22]
LBB0_2:
	mov	x27, x19
	cbz	x20, LBB0_26
; %bb.3:
	cmp	w6, #0
	cset	w25, eq
	mov	x27, x19
	mov	x28, x20
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w21, #0
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	w21, w26
	b.lt	LBB0_19
; %bb.6:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	x28, LBB0_26
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldrb	w21, [x24]
	cbz	w21, LBB0_26
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	sxtb	w26, w21
	mov	x0, x26
	bl	_IS_HIGHBIT_SET
	cbz	w0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	mov	x1, x24
	bl	_pg_encoding_mblen
	mov	x26, x0
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x21, #0
	mov	x8, x28
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x24, x21]
	cbz	w9, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	strb	w9, [x27, x21]
	sub	x28, x8, #1
	add	x21, x21, #1
	cmp	w21, w26
	b.ge	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	cmp	x8, #1
	mov	x8, x28
	b.ne	LBB0_11
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, x21
	add	x27, x27, x21
	b	LBB0_5
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x26
	mov	x1, x25
	bl	_SQL_STR_DOUBLE
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	strb	w21, [x27], #1
LBB0_17:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w21, [x27], #1
	add	x24, x24, #1
	sub	x28, x28, #1
	cbnz	x28, LBB0_7
	b	LBB0_26
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, x21
	add	x27, x27, x21
	mov	x28, x8
	b	LBB0_5
LBB0_19:
	cbz	x22, LBB0_21
; %bb.20:
	mov	w8, #1
	str	w8, [x22]
LBB0_21:
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	cbz	x22, LBB0_23
; %bb.22:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x22
	bl	_printfPQExpBuffer
LBB0_23:
	sub	w8, w26, w21
	sub	x9, x27, x19
	mov	w10, #32
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	cmp	x20, x9, lsr #1
	b.ls	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	strb	w10, [x27], #1
	add	x9, x9, #1
	subs	w8, w8, #1
	b.ne	LBB0_24
LBB0_26:
	strb	wzr, [x27]
	sub	x0, x27, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"incomplete multibyte character\n"

	.no_dead_strip	_PQescapeStringInternal
.subsections_via_symbols
