	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pqSocketCheck
_pqSocketCheck:                         ## @pqSocketCheck
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$-1, %r15d
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movq	_PGINVALID_SOCKET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_2
## %bb.10:
	addq	$8, %r14
	leaq	L_.str(%rip), %rdi
	callq	_libpq_gettext
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printfPQExpBuffer
	jmp	LBB0_8
LBB0_2:
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r14d
	callq	_pqSocketPoll
	movl	%eax, %r15d
	shrl	$31, %eax
	movq	_SOCK_ERRNO@GOTPCREL(%rip), %rbx
	testl	%r15d, %r15d
	jns	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, (%rbx)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	callq	_pqSocketPoll
	movl	%eax, %r15d
	shrl	$31, %eax
	testl	%r15d, %r15d
	js	LBB0_4
LBB0_6:
	testb	%al, %al
	je	LBB0_8
## %bb.7:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_PG_STRERROR_R_BUFLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	addq	$8, %r14
	leaq	L_.str.1(%rip), %rdi
	callq	_libpq_gettext
	movl	%eax, %r13d
	movq	_SOCK_ERRNO@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_SOCK_STRERROR
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printfPQExpBuffer
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.9:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PGINVALID_SOCKET,8,3           ## @PGINVALID_SOCKET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid socket\n"

	.comm	_SOCK_ERRNO,8,3                 ## @SOCK_ERRNO
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_PG_STRERROR_R_BUFLEN,4,2       ## @PG_STRERROR_R_BUFLEN
L_.str.1:                               ## @.str.1
	.asciz	"select() failed: %s\n"

	.no_dead_strip	_pqSocketCheck
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pqSocketCheck
_pqSocketCheck:                         ; @pqSocketCheck
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x0, [x0]
Lloh3:
	adrp	x8, _PGINVALID_SOCKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PGINVALID_SOCKET@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	add	x19, x20, #8
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x19
	bl	_printfPQExpBuffer
LBB0_3:
	mov	w19, #-1
LBB0_4:
	ldur	x8, [x29, #-72]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.5:
	mov	x0, x19
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	bl	_pqSocketPoll
	mov	x19, x0
	lsr	w8, w0, #31
Lloh11:
	adrp	x24, _SOCK_ERRNO@GOTPAGE
Lloh12:
	ldr	x24, [x24, _SOCK_ERRNO@GOTPAGEOFF]
	tbz	w0, #31, LBB0_11
; %bb.7:
	ldr	x9, [x24]
Lloh13:
	adrp	x25, _EINTR@GOTPAGE
Lloh14:
	ldr	x25, [x25, _EINTR@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x25]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x20]
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	bl	_pqSocketPoll
	mov	x19, x0
	lsr	w8, w0, #31
	tbz	w0, #31, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x24]
	b	LBB0_8
LBB0_11:
	cbz	w8, LBB0_4
; %bb.12:
	mov	x25, sp
Lloh15:
	adrp	x8, _PG_STRERROR_R_BUFLEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PG_STRERROR_R_BUFLEN@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	mov	x9, x21
Lloh18:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh19:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
	add	x20, x20, #8
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libpq_gettext
	mov	x23, x0
	ldr	x0, [x24]
	mov	x1, x22
	mov	x2, x21
	bl	_SOCK_STRERROR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
	mov	x0, x20
	mov	x1, x23
	bl	_printfPQExpBuffer
	add	sp, sp, #16
	mov	sp, x25
	b	LBB0_4
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PGINVALID_SOCKET,8,3           ; @PGINVALID_SOCKET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid socket\n"

	.comm	_SOCK_ERRNO,8,3                 ; @SOCK_ERRNO
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_PG_STRERROR_R_BUFLEN,4,2       ; @PG_STRERROR_R_BUFLEN
l_.str.1:                               ; @.str.1
	.asciz	"select() failed: %s\n"

	.no_dead_strip	_pqSocketCheck
.subsections_via_symbols
