	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrintResultsInCrosstab         ## -- Begin function PrintResultsInCrosstab
	.p2align	4, 0x90
_PrintResultsInCrosstab:                ## @PrintResultsInCrosstab
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	-64(%rbp), %rdi
	callq	_avlInit
	leaq	-56(%rbp), %rdi
	callq	_avlInit
	movq	%r15, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_PQnfields
	cmpl	$2, %eax
	jg	LBB0_7
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rdi
LBB0_4:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_5:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
LBB0_6:
	movl	-52(%rbp), %esi
	leaq	-56(%rbp), %rdi
	callq	_avlFree
	movl	-60(%rbp), %esi
	leaq	-64(%rbp), %rdi
	callq	_avlFree
	movq	%r12, %rdi
	callq	_pg_free
	movq	%rbx, %rdi
	callq	_pg_free
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_pset@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	movq	%r15, %rsi
	callq	_indexOfColumn
	testl	%eax, %eax
	js	LBB0_29
## %bb.9:
	movl	%eax, %r14d
	movq	(%r12), %rax
	jmp	LBB0_11
LBB0_10:
	xorl	%r14d, %r14d
LBB0_11:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.12:
	movq	%r15, %rsi
	callq	_indexOfColumn
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_29
## %bb.13:
	cmpl	%r14d, %ebx
	jne	LBB0_16
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_15:
	movl	$1, %ebx
	cmpl	%r14d, %ebx
	je	LBB0_14
LBB0_16:
	movq	(%r12), %rax
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_18
## %bb.17:
	movq	%r15, %rsi
	callq	_indexOfColumn
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_27
	jmp	LBB0_29
LBB0_18:
	movq	%r15, %rdi
	callq	_PQnfields
	cmpl	$3, %eax
	jne	LBB0_48
## %bb.19:
	movq	%r15, %rdi
	callq	_PQnfields
	movl	$-1, %r13d
	testl	%eax, %eax
	jle	LBB0_26
## %bb.20:
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_21:                                ##   in Loop: Header=BB0_22 Depth=1
	incl	%ebx
	movq	%r15, %rdi
	callq	_PQnfields
	cmpl	%eax, %ebx
	jge	LBB0_25
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, %r14d
	je	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	cmpl	%ebx, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_21
## %bb.24:
	movl	%ebx, %r13d
LBB0_25:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_26:
	movl	%r13d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_Assert
LBB0_27:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	24(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_30
## %bb.28:
	movq	%r15, %rsi
	callq	_indexOfColumn
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_31
LBB0_29:
	xorl	%r14d, %r14d
	jmp	LBB0_5
LBB0_30:
	movl	$-1, %r13d
LBB0_31:
	movq	%r15, %rdi
	callq	_PQntuples
	testl	%eax, %eax
	jle	LBB0_45
## %bb.32:
	xorl	%r12d, %r12d
	jmp	LBB0_35
LBB0_33:                                ##   in Loop: Header=BB0_35 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_PQgetvalue
	movq	%rax, %rsi
LBB0_34:                                ##   in Loop: Header=BB0_35 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	leaq	-64(%rbp), %rdi
	xorl	%edx, %edx
	callq	_avlMergeValue
	incl	%r12d
	movq	%r15, %rdi
	callq	_PQntuples
	cmpl	%eax, %r12d
	jge	LBB0_45
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_PQgetisnull
	testq	%rax, %rax
	je	LBB0_39
## %bb.36:                              ##   in Loop: Header=BB0_35 Depth=1
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	jns	LBB0_37
	jmp	LBB0_40
LBB0_39:                                ##   in Loop: Header=BB0_35 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_PQgetvalue
	movq	%rax, %rbx
	testl	%r13d, %r13d
	js	LBB0_40
LBB0_37:                                ##   in Loop: Header=BB0_35 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_PQgetisnull
	testq	%rax, %rax
	je	LBB0_41
LBB0_40:                                ##   in Loop: Header=BB0_35 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_42
LBB0_41:                                ##   in Loop: Header=BB0_35 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_PQgetvalue
	movq	%rax, %rdx
LBB0_42:                                ##   in Loop: Header=BB0_35 Depth=1
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_avlMergeValue
	movq	_CROSSTABVIEW_MAX_COLUMNS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, -56(%rbp)
	jg	LBB0_49
## %bb.43:                              ##   in Loop: Header=BB0_35 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_PQgetisnull
	testq	%rax, %rax
	je	LBB0_33
## %bb.44:                              ##   in Loop: Header=BB0_35 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_34
LBB0_45:
	movl	-56(%rbp), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	-64(%rbp), %ebx
	leal	(,%rax,4), %edi
	callq	_pg_malloc
	movq	%rax, %r12
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leal	(,%rbx,4), %edi
	callq	_pg_malloc
	movq	%rax, %rbx
	movl	-52(%rbp), %esi
	leaq	-56(%rbp), %rdi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_avlCollectFields
	movl	-60(%rbp), %esi
	leaq	-64(%rbp), %rdi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_avlCollectFields
	testl	%r13d, %r13d
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	js	LBB0_47
## %bb.46:
	movl	%r13d, %edi
	movq	%r12, %rsi
	callq	_rankSort
LBB0_47:
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	%r12, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%rbx, %r9
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%r14
	callq	_printCrosstab
	addq	$16, %rsp
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_48:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_4
LBB0_49:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\\crosstabview: statement did not return a result set"

L_.str.1:                               ## @.str.1
	.asciz	"\\crosstabview: query must return at least three columns"

	.comm	_pset,8,3                       ## @pset
L_.str.2:                               ## @.str.2
	.asciz	"\\crosstabview: vertical and horizontal headers must be different columns"

L_.str.3:                               ## @.str.3
	.asciz	"\\crosstabview: data column must be specified when query returns more than three columns"

	.comm	_CROSSTABVIEW_MAX_COLUMNS,4,2   ## @CROSSTABVIEW_MAX_COLUMNS
L_.str.4:                               ## @.str.4
	.asciz	"\\crosstabview: maximum number of columns (%d) exceeded"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrintResultsInCrosstab         ; -- Begin function PrintResultsInCrosstab
	.p2align	2
_PrintResultsInCrosstab:                ; @PrintResultsInCrosstab
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
	add	x0, sp, #16
	bl	_avlInit
	add	x0, sp, #24
	bl	_avlInit
	mov	x0, x19
	bl	_PQresultStatus
Lloh0:
	adrp	x8, _PGRES_TUPLES_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PGRES_TUPLES_OK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_PQnfields
	cmp	w0, #2
	b.gt	LBB0_7
; %bb.2:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_pg_log_error
LBB0_5:
	mov	w19, #0
	mov	x24, #0
	mov	x25, #0
LBB0_6:
	ldr	w1, [sp, #28]
	add	x0, sp, #24
	bl	_avlFree
	ldr	w1, [sp, #20]
	add	x0, sp, #16
	bl	_avlFree
	mov	x0, x24
	bl	_pg_free
	mov	x0, x25
	bl	_pg_free
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
Lloh7:
	adrp	x23, _pset@GOTPAGE
Lloh8:
	ldr	x23, [x23, _pset@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x0, [x8]
	cbz	x0, LBB0_13
; %bb.8:
	mov	x1, x19
	bl	_indexOfColumn
	tbnz	w0, #31, LBB0_5
; %bb.9:
	mov	x20, x0
	ldr	x8, [x23]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_14
LBB0_10:
	mov	x1, x19
	bl	_indexOfColumn
	mov	x21, x0
	tbnz	w0, #31, LBB0_5
; %bb.11:
	cmp	w21, w20
	b.ne	LBB0_15
LBB0_12:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_13:
	mov	w20, #0
	ldr	x0, [x8, #8]
	cbnz	x0, LBB0_10
LBB0_14:
	mov	w21, #1
	cmp	w21, w20
	b.eq	LBB0_12
LBB0_15:
	ldr	x8, [x23]
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_17
; %bb.16:
	mov	x1, x19
	bl	_indexOfColumn
	mov	x22, x0
	tbz	w0, #31, LBB0_26
	b	LBB0_5
LBB0_17:
	mov	x0, x19
	bl	_PQnfields
	cmp	w0, #3
	b.ne	LBB0_23
; %bb.18:
	mov	x0, x19
	bl	_PQnfields
	cmp	w0, #1
	b.lt	LBB0_24
; %bb.19:
	mov	w22, #0
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	w22, w22, #1
	mov	x0, x19
	bl	_PQnfields
	cmp	w22, w0
	b.ge	LBB0_24
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	cmp	w20, w22
	b.eq	LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	cmp	w21, w22
	b.eq	LBB0_20
	b	LBB0_25
LBB0_23:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_24:
	mov	w22, #-1
LBB0_25:
	mvn	w8, w22
	lsr	w0, w8, #31
	bl	_Assert
LBB0_26:
	ldr	x8, [x23]
	ldr	x0, [x8, #24]
	cbz	x0, LBB0_28
; %bb.27:
	mov	x1, x19
	bl	_indexOfColumn
	mov	x23, x0
	tbz	w0, #31, LBB0_29
	b	LBB0_5
LBB0_28:
	mov	w23, #-1
LBB0_29:
	mov	x0, x19
	bl	_PQntuples
	cmp	w0, #1
	b.lt	LBB0_42
; %bb.30:
	mov	w24, #0
Lloh13:
	adrp	x26, _CROSSTABVIEW_MAX_COLUMNS@GOTPAGE
Lloh14:
	ldr	x26, [x26, _CROSSTABVIEW_MAX_COLUMNS@GOTPAGEOFF]
	b	LBB0_33
LBB0_31:                                ;   in Loop: Header=BB0_33 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x20
	bl	_PQgetvalue
	mov	x1, x0
LBB0_32:                                ;   in Loop: Header=BB0_33 Depth=1
	add	x0, sp, #16
	mov	x2, #0
	bl	_avlMergeValue
	add	w24, w24, #1
	mov	x0, x19
	bl	_PQntuples
	cmp	w24, w0
	b.ge	LBB0_42
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x21
	bl	_PQgetisnull
	cbz	x0, LBB0_35
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	mov	x25, #0
	tbz	w23, #31, LBB0_36
	b	LBB0_37
LBB0_35:                                ;   in Loop: Header=BB0_33 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x21
	bl	_PQgetvalue
	mov	x25, x0
	tbnz	w23, #31, LBB0_37
LBB0_36:                                ;   in Loop: Header=BB0_33 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_PQgetisnull
	cbz	x0, LBB0_38
LBB0_37:                                ;   in Loop: Header=BB0_33 Depth=1
	mov	x2, #0
	b	LBB0_39
LBB0_38:                                ;   in Loop: Header=BB0_33 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_PQgetvalue
	mov	x2, x0
LBB0_39:                                ;   in Loop: Header=BB0_33 Depth=1
	add	x0, sp, #24
	mov	x1, x25
	bl	_avlMergeValue
	ldr	w9, [sp, #24]
	ldr	w8, [x26]
	cmp	w9, w8
	b.gt	LBB0_45
; %bb.40:                               ;   in Loop: Header=BB0_33 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x20
	bl	_PQgetisnull
	cbz	x0, LBB0_31
; %bb.41:                               ;   in Loop: Header=BB0_33 Depth=1
	mov	x1, #0
	b	LBB0_32
LBB0_42:
	ldr	w27, [sp, #24]
	ldr	w26, [sp, #16]
	lsl	w0, w27, #2
	bl	_pg_malloc
	mov	x24, x0
	lsl	w0, w26, #2
	bl	_pg_malloc
	mov	x25, x0
	ldr	w1, [sp, #28]
	add	x0, sp, #24
	mov	x2, x24
	mov	w3, #0
	bl	_avlCollectFields
	ldr	w1, [sp, #20]
	add	x0, sp, #16
	mov	x2, x25
	mov	w3, #0
	bl	_avlCollectFields
	tbnz	w23, #31, LBB0_44
; %bb.43:
	mov	x0, x27
	mov	x1, x24
	bl	_rankSort
LBB0_44:
	mov	x0, x19
	mov	x1, x27
	mov	x2, x24
	mov	x3, x21
	mov	x4, x26
	mov	x5, x25
	mov	x6, x20
	mov	x7, x22
	bl	_printCrosstab
	mov	x19, x0
	b	LBB0_6
LBB0_45:
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\\crosstabview: statement did not return a result set"

l_.str.1:                               ; @.str.1
	.asciz	"\\crosstabview: query must return at least three columns"

	.comm	_pset,8,3                       ; @pset
l_.str.2:                               ; @.str.2
	.asciz	"\\crosstabview: vertical and horizontal headers must be different columns"

l_.str.3:                               ; @.str.3
	.asciz	"\\crosstabview: data column must be specified when query returns more than three columns"

	.comm	_CROSSTABVIEW_MAX_COLUMNS,4,2   ; @CROSSTABVIEW_MAX_COLUMNS
l_.str.4:                               ; @.str.4
	.asciz	"\\crosstabview: maximum number of columns (%d) exceeded"

.subsections_via_symbols
