	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageOutput                     ## -- Begin function PageOutput
	.p2align	4, 0x90
_PageOutput:                            ## @PageOutput
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	cmpw	$0, (%rsi)
	je	LBB0_9
## %bb.2:
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_fileno
	movl	%eax, %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	_stdout@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_fileno
	movl	%eax, %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strspn
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_strlen
	cmpq	%rax, %r14
	jne	LBB0_7
## %bb.11:
	movq	(%r15), %rax
	jmp	LBB0_12
LBB0_6:
	movq	_DEFAULT_PAGER@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_7:
	xorl	%eax, %eax
	callq	_disable_sigpipe_trap
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_popen
	testq	%rax, %rax
	jne	LBB0_12
## %bb.8:
	xorl	%eax, %eax
	callq	_restore_sigpipe_trap
LBB0_9:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdin,8,3                      ## @stdin
	.comm	_stdout,8,3                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PSQL_PAGER"

L_.str.1:                               ## @.str.1
	.asciz	"PAGER"

	.comm	_DEFAULT_PAGER,8,3              ## @DEFAULT_PAGER
L_.str.2:                               ## @.str.2
	.asciz	" \t\r\n"

L_.str.3:                               ## @.str.3
	.asciz	"w"

	.comm	_TIOCGWINSZ,4,2                 ## @TIOCGWINSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageOutput                     ; -- Begin function PageOutput
	.p2align	2
_PageOutput:                            ; @PageOutput
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x21, _stdout@GOTPAGE
Lloh1:
	ldr	x21, [x21, _stdout@GOTPAGEOFF]
	cbz	x1, LBB0_10
; %bb.1:
	ldrh	w8, [x1]
	cbz	w8, LBB0_10
; %bb.2:
Lloh2:
	adrp	x8, _stdin@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	bl	_fileno
	bl	_isatty
	cbz	x0, LBB0_10
; %bb.3:
	ldr	x0, [x21]
	bl	_fileno
	bl	_isatty
	cbz	x0, LBB0_10
; %bb.4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	mov	x19, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	mov	x19, x0
	cbz	x0, LBB0_7
LBB0_6:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_strspn
	mov	x20, x0
	mov	x0, x19
	bl	_strlen
	cmp	x20, x0
	b.ne	LBB0_8
	b	LBB0_10
LBB0_7:
Lloh11:
	adrp	x8, _DEFAULT_PAGER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DEFAULT_PAGER@GOTPAGEOFF]
Lloh13:
	ldr	x19, [x8]
LBB0_8:
	bl	_disable_sigpipe_trap
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_popen
	cbnz	x0, LBB0_11
; %bb.9:
	bl	_restore_sigpipe_trap
LBB0_10:
	ldr	x0, [x21]
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_stdin,8,3                      ; @stdin
	.comm	_stdout,8,3                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PSQL_PAGER"

l_.str.1:                               ; @.str.1
	.asciz	"PAGER"

	.comm	_DEFAULT_PAGER,8,3              ; @DEFAULT_PAGER
l_.str.2:                               ; @.str.2
	.asciz	" \t\r\n"

l_.str.3:                               ; @.str.3
	.asciz	"w"

	.comm	_TIOCGWINSZ,4,2                 ; @TIOCGWINSZ
.subsections_via_symbols
