	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_categories_hash
_load_categories_hash:                  ## @load_categories_hash
	.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
	movl	%esi, %ebx
	movq	%rdi, %r12
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_MemSet
	movq	_MAX_CATNAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	$4, -64(%rbp)
	movl	%ebx, %r15d
	movl	%ebx, -60(%rbp)
	movq	_INIT_CATS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HASH_ELEM@GOTPCREL(%rip), %rax
	movq	_HASH_CONTEXT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	callq	_hash_create
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_SPI_connect
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_elog
LBB0_2:
	movq	%r12, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_SPI_execute
	movq	_SPI_OK_SELECT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.3:
	movq	_SPI_processed@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	jle	LBB0_8
## %bb.4:
	movq	_SPI_tuptable@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	8(%r12), %rcx
	cmpl	$1, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ERRCODE_SYNTAX_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rcx, %r14
	callq	_errcode
	leaq	L_.str.2(%rip), %rdi
	callq	_errmsg
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	%r14, %rcx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_6:
	xorl	%r14d, %r14d
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax,%r14,4), %edi
	movq	%rcx, %r15
	movq	%rcx, %rsi
	movl	$1, %edx
	callq	_SPI_getvalue
	movq	%rax, %rbx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_MemoryContextSwitchTo
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$16, %edi
	callq	_palloc
	movq	%rbx, (%rax)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%r14, 8(%rax)
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_crosstab_HashTableInsert
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_MemoryContextSwitchTo
	movq	%r15, %rcx
	incq	%r14
	cmpq	%r14, %rbx
	jne	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	callq	_SPI_finish
	movq	_SPI_OK_FINISH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_10:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CATNAME_LEN,4,2            ## @MAX_CATNAME_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crosstab hash"

	.comm	_INIT_CATS,4,2                  ## @INIT_CATS
	.comm	_HASH_ELEM,4,2                  ## @HASH_ELEM
	.comm	_HASH_CONTEXT,4,2               ## @HASH_CONTEXT
	.comm	_ERROR,4,2                      ## @ERROR
L_.str.1:                               ## @.str.1
	.asciz	"load_categories_hash: SPI_connect returned %d"

	.comm	_SPI_processed,8,3              ## @SPI_processed
	.comm	_SPI_OK_SELECT,4,2              ## @SPI_OK_SELECT
	.comm	_SPI_tuptable,8,3               ## @SPI_tuptable
	.comm	_ERRCODE_SYNTAX_ERROR,4,2       ## @ERRCODE_SYNTAX_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"provided \"categories\" SQL must return 1 column of at least one row"

	.comm	_SPI_OK_FINISH,8,3              ## @SPI_OK_FINISH
L_.str.3:                               ## @.str.3
	.asciz	"load_categories_hash: SPI_finish() failed"

	.no_dead_strip	_load_categories_hash
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_categories_hash
_load_categories_hash:                  ; @load_categories_hash
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x1
	mov	x21, x0
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_MemSet
Lloh0:
	adrp	x8, _MAX_CATNAME_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_CATNAME_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w19, w8, [sp, #20]
	mov	w8, #4
	str	w8, [sp, #16]
Lloh3:
	adrp	x8, _INIT_CATS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INIT_CATS@GOTPAGEOFF]
Lloh5:
	adrp	x9, _HASH_ELEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HASH_ELEM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _HASH_CONTEXT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HASH_CONTEXT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #16
	bl	_hash_create
	mov	x20, x0
	bl	_SPI_connect
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh14:
	adrp	x8, _ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	x0, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_elog
LBB0_2:
	mov	x0, x21
	mov	w1, #1
	mov	w2, #0
	bl	_SPI_execute
Lloh19:
	adrp	x8, _SPI_processed@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SPI_processed@GOTPAGEOFF]
Lloh21:
	ldr	x24, [x8]
Lloh22:
	adrp	x8, _SPI_OK_SELECT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SPI_OK_SELECT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, w8
	ccmp	x24, #1, #8, eq
	b.lt	LBB0_7
; %bb.3:
Lloh25:
	adrp	x8, _SPI_tuptable@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SPI_tuptable@GOTPAGEOFF]
Lloh27:
	ldr	x25, [x8]
	ldr	x21, [x25, #8]
	ldr	w8, [x21]
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.4:
Lloh28:
	adrp	x8, _ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w22, [x8]
Lloh31:
	adrp	x8, _ERRCODE_SYNTAX_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ERRCODE_SYNTAX_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_errcode
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_5:
	mov	x26, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w0, [x8, x26, lsl #2]
	mov	x1, x21
	mov	w2, #1
	bl	_SPI_getvalue
	mov	x22, x0
	mov	x0, x19
	bl	_MemoryContextSwitchTo
	mov	x23, x0
	mov	w0, #16
	bl	_palloc
	mov	x1, x0
	stp	x22, x26, [x0]
	mov	x0, x20
	bl	_crosstab_HashTableInsert
	mov	x0, x23
	bl	_MemoryContextSwitchTo
	add	x26, x26, #1
	cmp	x24, x26
	b.ne	LBB0_6
LBB0_7:
	bl	_SPI_finish
Lloh36:
	adrp	x8, _SPI_OK_FINISH@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SPI_OK_FINISH@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
Lloh39:
	adrp	x8, _ERROR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_elog
LBB0_9:
	mov	x0, x20
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CATNAME_LEN,4,2            ; @MAX_CATNAME_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crosstab hash"

	.comm	_INIT_CATS,4,2                  ; @INIT_CATS
	.comm	_HASH_ELEM,4,2                  ; @HASH_ELEM
	.comm	_HASH_CONTEXT,4,2               ; @HASH_CONTEXT
	.comm	_ERROR,4,2                      ; @ERROR
l_.str.1:                               ; @.str.1
	.asciz	"load_categories_hash: SPI_connect returned %d"

	.comm	_SPI_processed,8,3              ; @SPI_processed
	.comm	_SPI_OK_SELECT,4,2              ; @SPI_OK_SELECT
	.comm	_SPI_tuptable,8,3               ; @SPI_tuptable
	.comm	_ERRCODE_SYNTAX_ERROR,4,2       ; @ERRCODE_SYNTAX_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"provided \"categories\" SQL must return 1 column of at least one row"

	.comm	_SPI_OK_FINISH,8,3              ; @SPI_OK_FINISH
l_.str.3:                               ; @.str.3
	.asciz	"load_categories_hash: SPI_finish() failed"

	.no_dead_strip	_load_categories_hash
.subsections_via_symbols
