	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_do_encoding_conversion      ## -- Begin function pg_do_encoding_conversion
	.p2align	4, 0x90
_pg_do_encoding_conversion:             ## @pg_do_encoding_conversion
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%esi, %esi
	jle	LBB0_15
## %bb.1:
	movl	%ecx, %ebx
	movl	%edx, %r12d
	cmpl	%ecx, %edx
	je	LBB0_15
## %bb.2:
	movq	_PG_SQL_ASCII@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%ebx, %eax
	je	LBB0_15
## %bb.3:
	movl	%esi, %r14d
	cmpl	%r12d, %eax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_pg_verify_mbstr
	jmp	LBB0_15
LBB0_5:
	xorl	%eax, %eax
	callq	_IsTransactionState
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_7:
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_FindDefaultConversionProc
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_OidIsValid
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ERRCODE_UNDEFINED_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	%r12d, %edi
	callq	_pg_encoding_to_char
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_pg_encoding_to_char
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errmsg
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_9:
	movq	_MaxAllocHugeSize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MAX_CONVERSION_GROWTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cltd
	idivl	%esi
	cmpl	%r14d, %eax
	jg	LBB0_11
## %bb.10:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	callq	_errdetail
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	_MAX_CONVERSION_GROWTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_11:
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	imull	%r14d, %esi
	incl	%esi
	callq	_MemoryContextAllocHuge
	movq	%rax, %r13
	movl	%r12d, %edi
	callq	_Int32GetDatum
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_Int32GetDatum
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_CStringGetDatum
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_CStringGetDatum
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_Int32GetDatum
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movl	%eax, %r9d
	callq	_OidFunctionCall5
	movq	%r13, %r15
	cmpl	$1000001, %r14d                 ## imm = 0xF4241
	jb	LBB0_15
## %bb.12:
	movq	%r13, %rdi
	callq	_strlen
	movl	%eax, %ebx
	movq	_MaxAllocSize@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_14
## %bb.13:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	callq	_errdetail
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_14:
	incl	%ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_repalloc
	movq	%rax, %r15
LBB0_15:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_SQL_ASCII,4,2               ## @PG_SQL_ASCII
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot perform encoding conversion outside a transaction"

	.comm	_ERRCODE_UNDEFINED_FUNCTION,4,2 ## @ERRCODE_UNDEFINED_FUNCTION
L_.str.1:                               ## @.str.1
	.asciz	"default conversion function for encoding \"%s\" to \"%s\" does not exist"

	.comm	_MaxAllocHugeSize,4,2           ## @MaxAllocHugeSize
	.comm	_MAX_CONVERSION_GROWTH,4,2      ## @MAX_CONVERSION_GROWTH
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
L_.str.2:                               ## @.str.2
	.asciz	"out of memory"

L_.str.3:                               ## @.str.3
	.asciz	"String of %d bytes is too long for encoding conversion."

	.comm	_CurrentMemoryContext,4,2       ## @CurrentMemoryContext
	.comm	_MaxAllocSize,4,2               ## @MaxAllocSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_do_encoding_conversion      ; -- Begin function pg_do_encoding_conversion
	.p2align	2
_pg_do_encoding_conversion:             ; @pg_do_encoding_conversion
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x0
	cmp	w1, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x21, x3
	mov	x22, x2
	cmp	w2, w3
	b.eq	LBB0_15
; %bb.2:
Lloh0:
	adrp	x8, _PG_SQL_ASCII@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PG_SQL_ASCII@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_15
; %bb.3:
	mov	x19, x1
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	bl	_pg_verify_mbstr
	b	LBB0_15
LBB0_5:
	bl	_IsTransactionState
	cbnz	w0, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_7:
	mov	x0, x22
	mov	x1, x21
	bl	_FindDefaultConversionProc
	mov	x23, x0
	bl	_OidIsValid
	cbnz	w0, LBB0_9
; %bb.8:
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w24, [x8]
Lloh11:
	adrp	x8, _ERRCODE_UNDEFINED_FUNCTION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERRCODE_UNDEFINED_FUNCTION@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x22
	bl	_pg_encoding_to_char
	mov	x25, x0
	mov	x0, x21
	bl	_pg_encoding_to_char
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x25, x0, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
LBB0_9:
Lloh16:
	adrp	x8, _MaxAllocHugeSize@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MaxAllocHugeSize@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x8]
Lloh19:
	adrp	x25, _MAX_CONVERSION_GROWTH@GOTPAGE
Lloh20:
	ldr	x25, [x25, _MAX_CONVERSION_GROWTH@GOTPAGEOFF]
	ldr	w8, [x25]
	sdiv	w9, w9, w8
	cmp	w9, w19
	b.gt	LBB0_11
; %bb.10:
Lloh21:
	adrp	x8, _ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w24, [x8]
Lloh24:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_errcode
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_errdetail
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
	ldr	w8, [x25]
LBB0_11:
Lloh31:
	adrp	x9, _CurrentMemoryContext@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CurrentMemoryContext@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x9]
	orr	w9, wzr, #0x1
	madd	w1, w8, w19, w9
	bl	_MemoryContextAllocHuge
	mov	x24, x0
	mov	x0, x22
	bl	_Int32GetDatum
	mov	x22, x0
	mov	x0, x21
	bl	_Int32GetDatum
	mov	x21, x0
	mov	x0, x20
	bl	_CStringGetDatum
	mov	x20, x0
	mov	x0, x24
	bl	_CStringGetDatum
	mov	x25, x0
	mov	x0, x19
	bl	_Int32GetDatum
	mov	x5, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x25
	bl	_OidFunctionCall5
	mov	w8, #16961
	movk	w8, #15, lsl #16
	mov	x20, x24
	cmp	w19, w8
	b.lo	LBB0_15
; %bb.12:
	mov	x0, x24
	bl	_strlen
	mov	x20, x0
Lloh34:
	adrp	x8, _MaxAllocSize@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MaxAllocSize@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w0, w8
	b.lt	LBB0_14
; %bb.13:
Lloh37:
	adrp	x8, _ERROR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh39:
	ldr	w21, [x8]
Lloh40:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_errcode
Lloh43:
	adrp	x0, l_.str.2@PAGE
Lloh44:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
Lloh45:
	adrp	x0, l_.str.3@PAGE
Lloh46:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_errdetail
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_14:
	add	w1, w20, #1
	mov	x0, x24
	bl	_repalloc
	mov	x20, x0
LBB0_15:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_SQL_ASCII,4,2               ; @PG_SQL_ASCII
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot perform encoding conversion outside a transaction"

	.comm	_ERRCODE_UNDEFINED_FUNCTION,4,2 ; @ERRCODE_UNDEFINED_FUNCTION
l_.str.1:                               ; @.str.1
	.asciz	"default conversion function for encoding \"%s\" to \"%s\" does not exist"

	.comm	_MaxAllocHugeSize,4,2           ; @MaxAllocHugeSize
	.comm	_MAX_CONVERSION_GROWTH,4,2      ; @MAX_CONVERSION_GROWTH
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
l_.str.2:                               ; @.str.2
	.asciz	"out of memory"

l_.str.3:                               ; @.str.3
	.asciz	"String of %d bytes is too long for encoding conversion."

	.comm	_CurrentMemoryContext,4,2       ; @CurrentMemoryContext
	.comm	_MaxAllocSize,4,2               ; @MaxAllocSize
.subsections_via_symbols
