	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_char_to_encoding            ## -- Begin function pg_char_to_encoding
	.p2align	4, 0x90
_pg_char_to_encoding:                   ## @pg_char_to_encoding
	.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
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_pg_encname_tbl@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_lengthof
	movl	%eax, %r12d
	movq	_NAMEDATALEN@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	movl	$-1, %eax
	testq	%r13, %r13
	je	LBB0_14
## %bb.1:
	cmpb	$0, (%r13)
	je	LBB0_14
## %bb.2:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	movl	%r12d, %eax
	shlq	$4, %rax
	leaq	(%rbx,%rax), %r14
	addq	$-16, %r14
	movq	%r13, %rdi
	callq	_strlen
	cmpl	(%r15), %eax
	jl	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_NAME_TOO_LONG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_4:
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_clean_encoding_name
	cmpq	%rbx, %r14
	jb	LBB0_13
## %bb.5:
	movq	%rax, %r15
	movsbl	(%rax), %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$16, %r12
	movq	%r12, %rbx
	cmpq	%rbx, %r14
	jb	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %r12
	subq	%rbx, %r12
	sarq	$5, %r12
	shlq	$4, %r12
	movq	(%rbx,%r12), %rsi
	movsbl	(%rsi), %ecx
	movl	%r13d, %eax
	subl	%ecx, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	addq	%rbx, %r12
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	$-16, %r12
	movq	%r12, %r14
	cmpq	%rbx, %r14
	jae	LBB0_6
LBB0_13:
	movl	$-1, %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	8(%rbx,%r12), %eax
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_pg_encname_tbl,8,3             ## @pg_encname_tbl
	.comm	_NAMEDATALEN,4,2                ## @NAMEDATALEN
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_NAME_TOO_LONG,4,2      ## @ERRCODE_NAME_TOO_LONG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encoding name too long"

	.comm	_stderr,4,2                     ## @stderr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_char_to_encoding            ; -- Begin function pg_char_to_encoding
	.p2align	2
_pg_char_to_encoding:                   ; @pg_char_to_encoding
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x20, _pg_encname_tbl@GOTPAGE
Lloh4:
	ldr	x20, [x20, _pg_encname_tbl@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_lengthof
	ldr	x22, [x20]
Lloh5:
	adrp	x21, _NAMEDATALEN@GOTPAGE
Lloh6:
	ldr	x21, [x21, _NAMEDATALEN@GOTPAGEOFF]
	ldr	w8, [x21]
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	cbz	x19, LBB0_5
; %bb.1:
	ldrb	w8, [x19]
	cbz	w8, LBB0_5
; %bb.2:
	add	x8, x22, w0, uxtw #4
	sub	x23, x8, #16
	mov	x0, x19
	bl	_strlen
	ldr	w8, [x21]
	cmp	w0, w8
	b.lt	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
Lloh12:
	adrp	x8, _ERRCODE_NAME_TOO_LONG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERRCODE_NAME_TOO_LONG@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_errcode
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_clean_encoding_name
	cmp	x23, x22
	b.hs	LBB0_8
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.7:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x19, x0
	ldrsb	w20, [x0]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	sub	x8, x21, #16
	add	x9, x21, #16
	cmp	w0, #0
	csel	x23, x8, x23, lt
	csel	x22, x22, x9, lt
	cmp	x23, x22
	b.lo	LBB0_5
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	x8, x23, x22
	asr	x24, x8, #5
	add	x21, x22, x24, lsl #4
	ldr	x1, [x21]
	ldrsb	w8, [x1]
	subs	w0, w20, w8
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	bl	_strcmp
	cbnz	w0, LBB0_9
; %bb.12:
	add	x8, x22, x24, lsl #4
	ldr	w0, [x8, #8]
	b	LBB0_6
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_pg_encname_tbl,8,3             ; @pg_encname_tbl
	.comm	_NAMEDATALEN,4,2                ; @NAMEDATALEN
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_NAME_TOO_LONG,4,2      ; @ERRCODE_NAME_TOO_LONG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encoding name too long"

	.comm	_stderr,4,2                     ; @stderr
.subsections_via_symbols
