	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function query_to_xml_internal
_query_to_xml_internal:                 ## @query_to_xml_internal
	.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
	movq	%r9, %r14
	movl	%r8d, %r12d
	movl	%ecx, %ebx
	movq	%rdx, %r13
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_map_sql_identifier_to_xml_name
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rax
LBB0_3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_makeStringInfo
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_SPI_connect
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_SPI_execute
	movq	_SPI_OK_SELECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	%r15d, %ebx
	movl	(%rax), %r15d
	movq	_ERRCODE_DATA_EXCEPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%ebx, %r15d
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movl	16(%rbp), %eax
	movl	%r12d, %ebx
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.7:
	testq	%r13, %r13
	je	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	movq	%r13, %rdx
	callq	_appendStringInfo
	movl	16(%rbp), %eax
LBB0_9:
	movq	_SPI_processed@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	movl	%ebx, %r12d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	%r15d, %ebx
	jle	LBB0_12
## %bb.10:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	movl	%r12d, %r8d
	movq	%r14, %r9
	callq	_SPI_sql_row_to_xmlelement
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	_SPI_processed@GOTPCREL(%rip), %rdx
	movl	16(%rbp), %eax
	incq	%r15
	cmpq	(%rdx), %r15
	jl	LBB0_11
LBB0_12:
	testl	%r12d, %r12d
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_xmldata_root_element_end
LBB0_14:
	xorl	%eax, %eax
	callq	_SPI_finish
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r15d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movq	%r14, %rcx
	movl	16(%rbp), %r8d
	callq	_xmldata_root_element_start
	movl	%r15d, %edi
	movl	$10, %esi
	callq	_appendStringInfoChar
	movl	16(%rbp), %eax
	testq	%r13, %r13
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"table"

	.comm	_SPI_OK_SELECT,8,3              ## @SPI_OK_SELECT
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_DATA_EXCEPTION,4,2     ## @ERRCODE_DATA_EXCEPTION
L_.str.1:                               ## @.str.1
	.asciz	"invalid query"

L_.str.2:                               ## @.str.2
	.asciz	"%s\n\n"

	.comm	_SPI_processed,8,3              ## @SPI_processed
	.no_dead_strip	_query_to_xml_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function query_to_xml_internal
_query_to_xml_internal:                 ; @query_to_xml_internal
	.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	x19, x6
	mov	x21, x5
	mov	x20, x4
	mov	x22, x3
	mov	x26, x2
	mov	x23, x1
	mov	x27, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x23
	mov	w1, #1
	mov	w2, #0
	bl	_map_sql_identifier_to_xml_name
	mov	x24, x0
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
LBB0_3:
	bl	_makeStringInfo
	mov	x25, x0
	bl	_SPI_connect
	mov	x0, x27
	mov	w1, #1
	mov	w2, #0
	bl	_SPI_execute
Lloh2:
	adrp	x8, _SPI_OK_SELECT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPI_OK_SELECT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.4:
	cbz	w20, LBB0_14
LBB0_5:
	cbz	x26, LBB0_7
LBB0_6:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x25
	mov	x2, x26
	bl	_appendStringInfo
LBB0_7:
Lloh7:
	adrp	x27, _SPI_processed@GOTPAGE
Lloh8:
	ldr	x27, [x27, _SPI_processed@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x26, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	mov	x1, x25
	mov	x2, x23
	mov	x3, x22
	mov	x4, x20
	mov	x5, x21
	mov	x6, x19
	bl	_SPI_sql_row_to_xmlelement
	add	x26, x26, #1
	ldr	x8, [x27]
	cmp	x26, x8
	b.lt	LBB0_9
LBB0_10:
	cbnz	w20, LBB0_12
; %bb.11:
	mov	x0, x25
	mov	x1, x24
	bl	_xmldata_root_element_end
LBB0_12:
	bl	_SPI_finish
	mov	x0, x25
	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
LBB0_13:
Lloh9:
	adrp	x8, _ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w27, [x8]
Lloh12:
	adrp	x8, _ERRCODE_DATA_EXCEPTION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERRCODE_DATA_EXCEPTION@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_errcode
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x27
	bl	_ereport
	cbnz	w20, LBB0_5
LBB0_14:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x26
	mov	x3, x21
	mov	x4, x19
	bl	_xmldata_root_element_start
	mov	x0, x25
	mov	w1, #10
	bl	_appendStringInfoChar
	cbnz	x26, LBB0_6
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"table"

	.comm	_SPI_OK_SELECT,8,3              ; @SPI_OK_SELECT
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_DATA_EXCEPTION,4,2     ; @ERRCODE_DATA_EXCEPTION
l_.str.1:                               ; @.str.1
	.asciz	"invalid query"

l_.str.2:                               ; @.str.2
	.asciz	"%s\n\n"

	.comm	_SPI_processed,8,3              ; @SPI_processed
	.no_dead_strip	_query_to_xml_internal
.subsections_via_symbols
