	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcp_attach
_tcp_attach:                            ## @tcp_attach
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	cmpq	$0, 16(%rbx)
	jne	LBB0_3
LBB0_2:
	movq	_V_tcp_sendspace@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_V_tcp_recvspace@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_soreserve
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
LBB0_3:
	movq	_SB_AUTOSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
	orl	%eax, 8(%rbx)
	callq	_NET_EPOCH_ENTER
	movq	_V_tcbinfo@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_in_pcballoc
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r14d
	callq	_NET_EPOCH_EXIT
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_sotoinpcb
	movq	%rax, %rbx
	movq	_INP_IPV4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_tcp_newtcpcb
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_TCPS_CLOSED@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movl	%ecx, (%rax)
	movq	%rbx, %rdi
	callq	_INP_WUNLOCK
	callq	_NET_EPOCH_EXIT
	movl	(%r14), %edi
	callq	_TCPSTATES_INC
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_in_pcbdetach
	movq	%rbx, %rdi
	callq	_in_pcbfree
	callq	_NET_EPOCH_EXIT
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V_tcp_sendspace,4,2            ## @V_tcp_sendspace
	.comm	_V_tcp_recvspace,4,2            ## @V_tcp_recvspace
	.comm	_SB_AUTOSIZE,4,2                ## @SB_AUTOSIZE
	.comm	_V_tcbinfo,4,2                  ## @V_tcbinfo
	.comm	_INP_IPV4,4,2                   ## @INP_IPV4
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_TCPS_CLOSED,4,2                ## @TCPS_CLOSED
	.comm	_IN6P_IPV6_V6ONLY,4,2           ## @IN6P_IPV6_V6ONLY
	.comm	_INP_IPV6,4,2                   ## @INP_IPV6
	.comm	_INP_IPV6PROTO,4,2              ## @INP_IPV6PROTO
	.no_dead_strip	_tcp_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcp_attach
_tcp_attach:                            ; @tcp_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _V_tcp_sendspace@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_tcp_sendspace@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _V_tcp_recvspace@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V_tcp_recvspace@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_soreserve
	mov	x20, x0
	cbnz	w0, LBB0_8
LBB0_3:
Lloh6:
	adrp	x8, _SB_AUTOSIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SB_AUTOSIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w9, w9, w8
	str	w9, [x19, #24]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, #0
	bl	_NET_EPOCH_ENTER
Lloh9:
	adrp	x1, _V_tcbinfo@GOTPAGE
Lloh10:
	ldr	x1, [x1, _V_tcbinfo@GOTPAGEOFF]
	mov	x0, x19
	bl	_in_pcballoc
	cbz	w0, LBB0_5
; %bb.4:
	mov	x20, x0
	mov	x0, #0
	bl	_NET_EPOCH_EXIT
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_sotoinpcb
	mov	x19, x0
Lloh11:
	adrp	x8, _INP_IPV4@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INP_IPV4@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	bl	_tcp_newtcpcb
	cbz	x0, LBB0_7
; %bb.6:
Lloh14:
	adrp	x20, _TCPS_CLOSED@GOTPAGE
Lloh15:
	ldr	x20, [x20, _TCPS_CLOSED@GOTPAGEOFF]
	ldr	w8, [x20]
	str	w8, [x0]
	mov	x0, x19
	bl	_INP_WUNLOCK
	mov	x0, #0
	bl	_NET_EPOCH_EXIT
	ldr	w0, [x20]
	bl	_TCPSTATES_INC
	mov	w20, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_in_pcbdetach
	mov	x0, x19
	bl	_in_pcbfree
	mov	x0, #0
	bl	_NET_EPOCH_EXIT
Lloh16:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh18:
	ldr	w20, [x8]
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_V_tcp_sendspace,4,2            ; @V_tcp_sendspace
	.comm	_V_tcp_recvspace,4,2            ; @V_tcp_recvspace
	.comm	_SB_AUTOSIZE,4,2                ; @SB_AUTOSIZE
	.comm	_V_tcbinfo,4,2                  ; @V_tcbinfo
	.comm	_INP_IPV4,4,2                   ; @INP_IPV4
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_TCPS_CLOSED,4,2                ; @TCPS_CLOSED
	.comm	_IN6P_IPV6_V6ONLY,4,2           ; @IN6P_IPV6_V6ONLY
	.comm	_INP_IPV6,4,2                   ; @INP_IPV6
	.comm	_INP_IPV6PROTO,4,2              ; @INP_IPV6PROTO
	.no_dead_strip	_tcp_attach
.subsections_via_symbols
