	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_read_sock                  ## -- Begin function tcp_read_sock
	.p2align	4, 0x90
_tcp_read_sock:                         ## @tcp_read_sock
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_tcp_sk
	movq	%rax, %rbx
	movq	(%r12), %rax
	movq	_TCP_LISTEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_2:
	movq	(%rbx), %r15
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_tcp_recv_skb
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:
	movq	%rax, %r14
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdx
	movq	(%r14), %r13
	subq	%rdx, %r13
	jbe	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 16(%rbx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rax
	subq	%r15, %rax
	cmpq	%r13, %rax
	cmovbq	%rax, %r13
	testq	%r13, %r13
	je	LBB0_19
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r13, %rcx
	callq	*-80(%rbp)                      ## 8-byte Folded Reload
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %eax
	cmpq	%rax, %r13
	jb	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	%rax, %r15
	addl	%ebx, -44(%rbp)                 ## 4-byte Folded Spill
	addq	%rax, -64(%rbp)
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	-1(%r15), %rsi
	movq	%r12, %rdi
	leaq	-64(%rbp), %rdx
	callq	_tcp_recv_skb
	testq	%rax, %rax
	je	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r14
	movq	-64(%rbp), %rax
	incq	%rax
	cmpq	(%r14), %rax
	jne	LBB0_19
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_tcp_hdr
	movq	(%rax), %rbx
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_sk_eat_skb
	testq	%rbx, %rbx
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, (%rbx)
	movq	%r12, %rdi
	movq	%r15, %rsi
	leaq	-64(%rbp), %rdx
	callq	_tcp_recv_skb
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_19
LBB0_15:
	movq	%r15, (%rbx)
	movq	%r12, %rdi
	callq	_tcp_rcv_space_adjust
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_16:
	incq	%r15
	jmp	LBB0_18
LBB0_17:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_22
LBB0_18:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movq	%r15, (%rbx)
	movq	%r12, %rdi
	callq	_tcp_rcv_space_adjust
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	jle	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_tcp_cleanup_rbuf
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	%r12, %rdi
	callq	_tcp_rcv_space_adjust
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_TCP_LISTEN,8,3                 ## @TCP_LISTEN
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_read_sock                  ; -- Begin function tcp_read_sock
	.p2align	2
_tcp_read_sock:                         ; @tcp_read_sock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	bl	_tcp_sk
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TCP_LISTEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TCP_LISTEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_20
LBB0_2:
	mov	x20, x0
	ldr	x22, [x0]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_tcp_recv_skb
	cbz	x0, LBB0_15
; %bb.3:
	mov	x25, x0
	mov	w21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [sp, #8]
	ldr	x8, [x25]
	subs	x26, x8, x2
	b.ls	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	sub	x8, x8, x22
	cmp	x8, x26
	csel	x26, x8, x26, lo
	cbz	x26, LBB0_18
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x25
	mov	x3, x26
	blr	x23
	mov	x25, x0
	tbnz	w0, #31, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, w25
	cmp	x26, x8
	b.lo	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, x8
	add	w21, w25, w21
	ldr	x9, [sp, #8]
	add	x8, x9, x8
	str	x8, [sp, #8]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	x1, x22, #1
	add	x2, sp, #8
	mov	x0, x19
	bl	_tcp_recv_skb
	cbz	x0, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	ldr	x8, [sp, #8]
	add	x8, x8, #1
	ldr	x9, [x0]
	cmp	x8, x9
	b.ne	LBB0_18
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	bl	_tcp_hdr
	ldr	x26, [x0]
	mov	x0, x19
	mov	x1, x25
	mov	w2, #0
	bl	_sk_eat_skb
	cbnz	x26, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	cbz	w8, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	str	x22, [x20]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_tcp_recv_skb
	mov	x25, x0
	cbnz	x0, LBB0_4
	b	LBB0_18
LBB0_15:
	str	x22, [x20]
	mov	x0, x19
	bl	_tcp_rcv_space_adjust
	mov	w21, #0
	b	LBB0_20
LBB0_16:
	add	x22, x22, #1
	b	LBB0_18
LBB0_17:
	cbz	w21, LBB0_21
LBB0_18:
	str	x22, [x20]
	mov	x0, x19
	bl	_tcp_rcv_space_adjust
	cmp	w21, #1
	b.lt	LBB0_20
; %bb.19:
	mov	x0, x19
	mov	x1, x21
	bl	_tcp_cleanup_rbuf
LBB0_20:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_21:
	str	x22, [x20]
	mov	x0, x19
	bl	_tcp_rcv_space_adjust
	mov	x21, x25
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TCP_LISTEN,8,3                 ; @TCP_LISTEN
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
.subsections_via_symbols
