	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pg_get_ruledef_worker
_pg_get_ruledef_worker:                 ## @pg_get_ruledef_worker
	.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	%esi, %r14d
	movl	%edi, %r15d
	leaq	-64(%rbp), %rdi
	callq	_initStringInfo
	xorl	%eax, %eax
	callq	_SPI_connect
	movq	_SPI_OK_CONNECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_2:
	movq	_plan_getrulebyoid@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	jne	LBB0_6
## %bb.3:
	movq	_OIDOID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_query_getrulebyoid@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	-48(%rbp), %rdx
	movl	$1, %esi
	callq	_SPI_prepare
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_5:
	movq	%rbx, %rdi
	callq	_SPI_keepplan
	movq	%rbx, (%r12)
LBB0_6:
	movl	%r15d, %edi
	callq	_ObjectIdGetDatum
	movl	%eax, -48(%rbp)
	movb	$32, -41(%rbp)
	movq	(%r12), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-41(%rbp), %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_SPI_execute_plan
	movq	_SPI_OK_SELECT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_elog
LBB0_8:
	movq	_SPI_processed@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_10
## %bb.9:
	movq	_SPI_tuptable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	leaq	-64(%rbp), %rdi
	movl	%r14d, %ecx
	callq	_make_ruledef
LBB0_10:
	xorl	%eax, %eax
	callq	_SPI_finish
	movq	_SPI_OK_FINISH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_12:
	movq	-64(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	-56(%rbp), %rax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_OK_CONNECT,8,3             ## @SPI_OK_CONNECT
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPI_connect failed"

	.comm	_plan_getrulebyoid,8,3          ## @plan_getrulebyoid
	.comm	_OIDOID,4,2                     ## @OIDOID
	.comm	_query_getrulebyoid,4,2         ## @query_getrulebyoid
L_.str.1:                               ## @.str.1
	.asciz	"SPI_prepare failed for \"%s\""

	.comm	_SPI_OK_SELECT,4,2              ## @SPI_OK_SELECT
L_.str.2:                               ## @.str.2
	.asciz	"failed to get pg_rewrite tuple for rule %u"

	.comm	_SPI_processed,4,2              ## @SPI_processed
	.comm	_SPI_tuptable,8,3               ## @SPI_tuptable
	.comm	_SPI_OK_FINISH,8,3              ## @SPI_OK_FINISH
L_.str.3:                               ## @.str.3
	.asciz	"SPI_finish failed"

	.no_dead_strip	_pg_get_ruledef_worker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pg_get_ruledef_worker
_pg_get_ruledef_worker:                 ; @pg_get_ruledef_worker
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	mov	x20, x0
	add	x0, sp, #8
	bl	_initStringInfo
	bl	_SPI_connect
Lloh0:
	adrp	x8, _SPI_OK_CONNECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_OK_CONNECT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x22, _ERROR@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ERROR@GOTPAGEOFF]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_2:
Lloh7:
	adrp	x23, _plan_getrulebyoid@GOTPAGE
Lloh8:
	ldr	x23, [x23, _plan_getrulebyoid@GOTPAGEOFF]
	ldr	x8, [x23]
	cbnz	x8, LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _OIDOID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OIDOID@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #28]
Lloh12:
	adrp	x24, _query_getrulebyoid@GOTPAGE
Lloh13:
	ldr	x24, [x24, _query_getrulebyoid@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x2, sp, #28
	mov	w1, #1
	bl	_SPI_prepare
	mov	x21, x0
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x22]
	ldr	w8, [x24]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_5:
	mov	x0, x21
	bl	_SPI_keepplan
	str	x21, [x23]
LBB0_6:
	mov	x0, x20
	bl	_ObjectIdGetDatum
	str	w0, [sp, #28]
	mov	w8, #32
	strb	w8, [sp, #27]
	ldr	x0, [x23]
	add	x1, sp, #28
	add	x2, sp, #27
	mov	w3, #1
	mov	w4, #0
	bl	_SPI_execute_plan
Lloh16:
	adrp	x8, _SPI_OK_SELECT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SPI_OK_SELECT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x22]
	str	x20, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elog
LBB0_8:
Lloh21:
	adrp	x8, _SPI_processed@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SPI_processed@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_10
; %bb.9:
Lloh24:
	adrp	x8, _SPI_tuptable@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SPI_tuptable@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	x9, [x8, #8]
	ldr	w1, [x9]
	ldr	w2, [x8]
	add	x0, sp, #8
	mov	x3, x19
	bl	_make_ruledef
LBB0_10:
	bl	_SPI_finish
Lloh27:
	adrp	x8, _SPI_OK_FINISH@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SPI_OK_FINISH@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.11:
	ldr	w0, [x22]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_elog
LBB0_12:
	ldp	x8, x9, [sp, #8]
	cmp	x8, #0
	csel	x0, xzr, x9, eq
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_OK_CONNECT,8,3             ; @SPI_OK_CONNECT
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPI_connect failed"

	.comm	_plan_getrulebyoid,8,3          ; @plan_getrulebyoid
	.comm	_OIDOID,4,2                     ; @OIDOID
	.comm	_query_getrulebyoid,4,2         ; @query_getrulebyoid
l_.str.1:                               ; @.str.1
	.asciz	"SPI_prepare failed for \"%s\""

	.comm	_SPI_OK_SELECT,4,2              ; @SPI_OK_SELECT
l_.str.2:                               ; @.str.2
	.asciz	"failed to get pg_rewrite tuple for rule %u"

	.comm	_SPI_processed,4,2              ; @SPI_processed
	.comm	_SPI_tuptable,8,3               ; @SPI_tuptable
	.comm	_SPI_OK_FINISH,8,3              ; @SPI_OK_FINISH
l_.str.3:                               ; @.str.3
	.asciz	"SPI_finish failed"

	.no_dead_strip	_pg_get_ruledef_worker
.subsections_via_symbols
