	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LocalToUtf                     ## -- Begin function LocalToUtf
	.p2align	4, 0x90
_LocalToUtf:                            ## @LocalToUtf
	.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	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r12
	movl	24(%rbp), %edi
	callq	_PG_VALID_ENCODING
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	jg	LBB0_3
	jmp	LBB0_26
LBB0_1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_INVALID_PARAMETER_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	movl	24(%rbp), %esi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	testl	%ebx, %ebx
	jg	LBB0_3
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r12), %eax
	incq	%r12
	movb	%al, (%r15)
	incq	%r15
	movl	$1, %r14d
LBB0_24:                                ##   in Loop: Header=BB0_3 Depth=1
	subl	%r14d, %ebx
	jle	LBB0_26
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r12), %eax
	testb	%al, %al
	je	LBB0_25
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %edi
	callq	_IS_HIGHBIT_SET
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	24(%rbp), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_pg_encoding_verifymb
	testl	%eax, %eax
	js	LBB0_25
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	leal	-1(%r14), %eax
	cmpl	$3, %eax
	ja	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r12), %eax
	incq	%r12
	xorl	%ecx, %ecx
	xorl	%edi, %edi
	xorl	%esi, %esi
	jmp	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	_elog
	xorl	%ecx, %ecx
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r12), %esi
	movzbl	1(%r12), %eax
	addq	$2, %r12
	xorl	%ecx, %ecx
	xorl	%edi, %edi
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r12), %edi
	movzbl	1(%r12), %esi
	movzbl	2(%r12), %eax
	addq	$3, %r12
	xorl	%ecx, %ecx
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r12), %ecx
	movzbl	1(%r12), %edi
	movzbl	2(%r12), %esi
	movzbl	3(%r12), %eax
	addq	$4, %r12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movb	%al, -41(%rbp)
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%cl, %edx
	movzbl	%dil, %ecx
	movzbl	%sil, %r8d
	movzbl	%al, %r9d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_pg_mb_radix_conv
	testb	%al, %al
	jne	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_compare4@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-41(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	$2, %ecx
	callq	_bsearch
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	movzbl	(%rax), %esi
	movq	%r15, %rdi
	callq	_store_coded_char
	movzbl	1(%r13), %esi
	movq	%rax, %rdi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	movzbl	-41(%rbp), %edi
	callq	*%rax
	testb	%al, %al
	je	LBB0_23
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %esi
	movq	%r15, %rdi
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	callq	_store_coded_char
	movq	%rax, %r15
	jmp	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_PG_UTF8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %eax
	movq	%r12, %rdx
	subq	%rax, %rdx
	movl	24(%rbp), %edi
	movl	%ebx, %ecx
	callq	_report_untranslatable_char
	jmp	LBB0_24
LBB0_25:
	movl	24(%rbp), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_report_invalid_encoding
LBB0_26:
	movb	$0, (%r15)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INVALID_PARAMETER_VALUE,4,2 ## @ERRCODE_INVALID_PARAMETER_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid encoding number: %d"

L_.str.1:                               ## @.str.1
	.asciz	"unsupported character length %d"

	.comm	_compare4,4,2                   ## @compare4
	.comm	_PG_UTF8,4,2                    ## @PG_UTF8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LocalToUtf                     ; -- Begin function LocalToUtf
	.p2align	2
_LocalToUtf:                            ; @LocalToUtf
	.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	x19, x7
	mov	x20, x6
	str	w5, [sp, #8]                    ; 4-byte Folded Spill
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x21, x1
	mov	x26, x0
	mov	x0, x7
	bl	_PG_VALID_ENCODING
	cbz	w0, LBB0_2
; %bb.1:
	cmp	w21, #1
	b.ge	LBB0_3
	b	LBB0_26
LBB0_2:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
Lloh3:
	adrp	x8, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_errcode
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x27
	bl	_ereport
	cmp	w21, #1
	b.lt	LBB0_26
LBB0_3:
Lloh8:
	adrp	x22, lJTI0_0@PAGE
Lloh9:
	add	x22, x22, lJTI0_0@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x26], #1
	strb	w8, [x25], #1
	mov	w28, #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	w21, w21, w28
	cmp	w21, #0
	b.le	LBB0_26
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w0, [x26]
	cbz	w0, LBB0_25
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_IS_HIGHBIT_SET
	cbz	w0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x26
	mov	x2, x21
	bl	_pg_encoding_verifymb
	tbnz	w0, #31, LBB0_25
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x28, x0
	sub	w8, w0, #1
	cmp	w8, #3
	b.hi	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	adr	x9, LBB0_11
	ldrb	w10, [x22, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	ldrb	w5, [x26], #1
	strb	w5, [sp, #15]
	cbnz	x24, LBB0_16
	b	LBB0_20
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh10:
	adrp	x8, _ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x28
	bl	_elog
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	strb	w5, [sp, #15]
	cbnz	x24, LBB0_16
	b	LBB0_20
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w2, #0
	mov	w3, #0
	ldrb	w4, [x26]
	ldrb	w5, [x26, #1]
	add	x26, x26, #2
	strb	w5, [sp, #15]
	cbnz	x24, LBB0_16
	b	LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w2, #0
	ldrb	w3, [x26]
	ldrb	w4, [x26, #1]
	ldrb	w5, [x26, #2]
	add	x26, x26, #3
	strb	w5, [sp, #15]
	cbnz	x24, LBB0_16
	b	LBB0_20
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w2, [x26]
	ldrb	w3, [x26, #1]
	ldrb	w4, [x26, #2]
	ldrb	w5, [x26, #3]
	add	x26, x26, #4
	strb	w5, [sp, #15]
	cbz	x24, LBB0_20
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	mov	x1, x28
	bl	_pg_mb_radix_conv
	cbnz	w0, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	x23, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh15:
	adrp	x8, _compare4@GOTPAGE
Lloh16:
	ldr	x8, [x8, _compare4@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	add	x0, sp, #15
	mov	x1, x23
	ldr	w2, [sp, #8]                    ; 4-byte Folded Reload
	mov	w3, #2
	bl	_bsearch
	cbz	x0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x27, x0
	ldrb	w1, [x0]
	mov	x0, x25
	bl	_store_coded_char
	ldrb	w1, [x27, #1]
	b	LBB0_23
LBB0_20:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x20, LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w0, [sp, #15]
	blr	x20
	cbz	w0, LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x0
	mov	x0, x25
LBB0_23:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_store_coded_char
	mov	x25, x0
	b	LBB0_5
LBB0_24:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh18:
	adrp	x8, _PG_UTF8@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PG_UTF8@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	sub	x2, x26, w28, uxtw
	mov	x0, x19
	mov	x3, x21
	bl	_report_untranslatable_char
	b	LBB0_5
LBB0_25:
	mov	x0, x19
	mov	x1, x26
	mov	x2, x21
	bl	_report_invalid_encoding
LBB0_26:
	strb	wzr, [x25]
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_13-LBB0_11)>>2
	.byte	(LBB0_14-LBB0_11)>>2
	.byte	(LBB0_15-LBB0_11)>>2
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INVALID_PARAMETER_VALUE,4,2 ; @ERRCODE_INVALID_PARAMETER_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid encoding number: %d"

l_.str.1:                               ; @.str.1
	.asciz	"unsupported character length %d"

	.comm	_compare4,4,2                   ; @compare4
	.comm	_PG_UTF8,4,2                    ; @PG_UTF8
.subsections_via_symbols
