	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StreamConnection               ## -- Begin function StreamConnection
	.p2align	4, 0x90
_StreamConnection:                      ## @StreamConnection
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	leaq	12(%rsi), %rdx
	movl	$4, 12(%rsi)
	addq	$16, %rsi
	callq	_accept
	movl	%eax, (%rbx)
	movq	_PGINVALID_SOCKET@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_socket_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movl	$100000, %edi                   ## imm = 0x186A0
	callq	_pg_usleep
	jmp	LBB0_9
LBB0_2:
	leaq	4(%rbx), %rdx
	movl	$4, 4(%rbx)
	leaq	8(%rbx), %r14
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_getsockname
	testq	%rax, %rax
	js	LBB0_7
## %bb.3:
	movl	(%r14), %edi
	callq	_IS_AF_UNIX
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	$1, -20(%rbp)
	movl	(%rbx), %edi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_KEEPALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-20(%rbp), %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	js	LBB0_8
## %bb.5:
	movq	_tcp_keepalives_idle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_pq_setkeepalivesidle
	movq	_tcp_keepalives_interval@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_pq_setkeepalivesinterval
	movq	_tcp_keepalives_count@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_pq_setkeepalivescount
	movq	_tcp_user_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_pq_settcpusertimeout
LBB0_6:
	movq	_STATUS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
	jmp	LBB0_9
LBB0_8:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.3(%rip), %rdx
	xorl	%eax, %eax
	callq	_elog
LBB0_9:
	movq	_STATUS_ERROR@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PGINVALID_SOCKET,4,2           ## @PGINVALID_SOCKET
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not accept new connection: %m"

	.comm	_STATUS_ERROR,4,2               ## @STATUS_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"getsockname() failed: %m"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_KEEPALIVE,4,2               ## @SO_KEEPALIVE
L_.str.2:                               ## @.str.2
	.asciz	"setsockopt(%s) failed: %m"

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

	.comm	_tcp_keepalives_idle,4,2        ## @tcp_keepalives_idle
	.comm	_tcp_keepalives_interval,4,2    ## @tcp_keepalives_interval
	.comm	_tcp_keepalives_count,4,2       ## @tcp_keepalives_count
	.comm	_tcp_user_timeout,4,2           ## @tcp_user_timeout
	.comm	_STATUS_OK,4,2                  ## @STATUS_OK
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_PQ_SEND_BUFFER_SIZE,4,2        ## @PQ_SEND_BUFFER_SIZE
	.comm	_SO_SNDBUF,4,2                  ## @SO_SNDBUF
	.comm	_TCP_NODELAY,4,2                ## @TCP_NODELAY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StreamConnection               ; -- Begin function StreamConnection
	.p2align	2
_StreamConnection:                      ; @StreamConnection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	w20, #4
	mov	x2, x1
	str	w20, [x2, #12]!
	add	x1, x1, #16
	bl	_accept
	str	w0, [x19]
Lloh0:
	adrp	x8, _PGINVALID_SOCKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PGINVALID_SOCKET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _LOG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	bl	_errcode_for_socket_access
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	mov	w0, #34464
	movk	w0, #1, lsl #16
	bl	_pg_usleep
	b	LBB0_10
LBB0_2:
	mov	x2, x19
	str	w20, [x2, #4]!
	add	x20, x2, #4
	mov	x1, x20
	bl	_getsockname
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldr	w0, [x20]
	bl	_IS_AF_UNIX
	cbnz	w0, LBB0_6
; %bb.4:
	mov	w8, #1
	str	w8, [sp, #12]
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _SO_KEEPALIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SO_KEEPALIVE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	tbnz	x0, #63, LBB0_8
; %bb.5:
Lloh14:
	adrp	x8, _tcp_keepalives_idle@GOTPAGE
Lloh15:
	ldr	x8, [x8, _tcp_keepalives_idle@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_pq_setkeepalivesidle
Lloh17:
	adrp	x8, _tcp_keepalives_interval@GOTPAGE
Lloh18:
	ldr	x8, [x8, _tcp_keepalives_interval@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_pq_setkeepalivesinterval
Lloh20:
	adrp	x8, _tcp_keepalives_count@GOTPAGE
Lloh21:
	ldr	x8, [x8, _tcp_keepalives_count@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_pq_setkeepalivescount
Lloh23:
	adrp	x8, _tcp_user_timeout@GOTPAGE
Lloh24:
	ldr	x8, [x8, _tcp_user_timeout@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_pq_settcpusertimeout
LBB0_6:
Lloh26:
	adrp	x8, _STATUS_OK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STATUS_OK@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
Lloh28:
	adrp	x8, _LOG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh33:
	adrp	x8, _LOG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x8, l_.str.3@PAGE
Lloh37:
	add	x8, x8, l_.str.3@PAGEOFF
	str	x8, [sp]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	bl	_elog
LBB0_10:
Lloh40:
	adrp	x8, _STATUS_ERROR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _STATUS_ERROR@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_PGINVALID_SOCKET,4,2           ; @PGINVALID_SOCKET
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not accept new connection: %m"

	.comm	_STATUS_ERROR,4,2               ; @STATUS_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"getsockname() failed: %m"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_KEEPALIVE,4,2               ; @SO_KEEPALIVE
l_.str.2:                               ; @.str.2
	.asciz	"setsockopt(%s) failed: %m"

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

	.comm	_tcp_keepalives_idle,4,2        ; @tcp_keepalives_idle
	.comm	_tcp_keepalives_interval,4,2    ; @tcp_keepalives_interval
	.comm	_tcp_keepalives_count,4,2       ; @tcp_keepalives_count
	.comm	_tcp_user_timeout,4,2           ; @tcp_user_timeout
	.comm	_STATUS_OK,4,2                  ; @STATUS_OK
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_PQ_SEND_BUFFER_SIZE,4,2        ; @PQ_SEND_BUFFER_SIZE
	.comm	_SO_SNDBUF,4,2                  ; @SO_SNDBUF
	.comm	_TCP_NODELAY,4,2                ; @TCP_NODELAY
.subsections_via_symbols
