	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcp_select_window
_tcp_select_window:                     ## @tcp_select_window
	.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
	movq	%rdi, %r15
	callq	_tcp_sk
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_tcp_receive_window
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	___tcp_select_window
	cmpl	%r14d, %eax
	jge	LBB0_2
## %bb.1:
	movb	16(%rbx), %cl
	movl	$1, %esi
	shll	%cl, %esi
	movl	%r14d, %edi
	callq	_ALIGN
LBB0_2:
	movl	%eax, (%rbx)
	movl	16(%rbx), %ecx
	movl	20(%rbx), %edx
	movl	$65535, %esi                    ## imm = 0xFFFF
	shll	%cl, %esi
	movl	%edx, 24(%rbx)
	movq	_sysctl_tcp_workaround_signed_windows@GOTPCREL(%rip), %rdx
	cmpq	$0, (%rdx)
	movl	%esi, %edx
	je	LBB0_4
## %bb.3:
	movq	_MAX_TCP_WINDOW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_4:
	testl	%ecx, %ecx
	cmovel	%edx, %esi
	movl	%eax, %edi
	callq	_min
	movb	16(%rbx), %cl
	sarl	%cl, %eax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	$0, 8(%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sysctl_tcp_workaround_signed_windows,8,3 ## @sysctl_tcp_workaround_signed_windows
	.comm	_MAX_TCP_WINDOW,4,2             ## @MAX_TCP_WINDOW
	.no_dead_strip	_tcp_select_window
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcp_select_window
_tcp_select_window:                     ; @tcp_select_window
	.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
	mov	x21, x0
	bl	_tcp_sk
	mov	x19, x0
	bl	_tcp_receive_window
	mov	x20, x0
	mov	x0, x21
	bl	___tcp_select_window
	cmp	w0, w20
	b.ge	LBB0_2
; %bb.1:
	ldr	w8, [x19, #16]
	mov	w9, #1
	lsl	w1, w9, w8
	mov	x0, x20
	bl	_ALIGN
LBB0_2:
	str	w0, [x19]
	ldp	w9, w8, [x19, #16]
	str	w8, [x19, #24]
Lloh0:
	adrp	x8, _sysctl_tcp_workaround_signed_windows@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sysctl_tcp_workaround_signed_windows@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
	ccmp	x9, #0, #0, ne
	mov	w8, #65535
	lsl	w8, w8, w9
Lloh3:
	adrp	x9, _MAX_TCP_WINDOW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_TCP_WINDOW@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	csel	w1, w9, w8, eq
	bl	_min
	ldr	w8, [x19, #16]
	asr	w0, w0, w8
	cbnz	w0, LBB0_4
; %bb.3:
	str	xzr, [x19, #8]
LBB0_4:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_sysctl_tcp_workaround_signed_windows,8,3 ; @sysctl_tcp_workaround_signed_windows
	.comm	_MAX_TCP_WINDOW,4,2             ; @MAX_TCP_WINDOW
	.no_dead_strip	_tcp_select_window
.subsections_via_symbols
