	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_select_initial_window      ## -- Begin function tcp_select_initial_window
	.p2align	4, 0x90
_tcp_select_initial_window:             ## @tcp_select_initial_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movl	%r8d, %r13d
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	xorl	%esi, %esi
	testl	%edi, %edi
	cmovgl	%edi, %esi
	movl	(%rcx), %edi
	testl	%edi, %edi
	jne	LBB0_2
## %bb.1:
	movl	$1073725440, (%r14)             ## imm = 0x3FFFC000
	movl	$1073725440, %edi               ## imm = 0x3FFFC000
LBB0_2:
	callq	_min
	movl	%eax, %edi
	cmpl	%r12d, %eax
	jbe	LBB0_4
## %bb.3:
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%r12d
	subl	%edx, %edi
LBB0_4:
	movq	_sysctl_tcp_workaround_signed_windows@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_MAX_TCP_WINDOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, %edi
LBB0_6:
	movl	%edi, (%r15)
	movl	$0, (%rbx)
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.8:
	movq	_u32@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_sysctl_tcp_rmem@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %esi
	movq	_sysctl_rmem_max@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_max_t
	movl	(%r13), %edi
	movl	(%r14), %edx
	movl	%eax, %esi
	callq	_min_t
	movl	(%rbx), %ecx
	cmpl	$65536, %eax                    ## imm = 0x10000
	jb	LBB0_13
## %bb.9:
	cmpl	$15, %ecx
	movl	$14, %edx
	cmovgel	%ecx, %edx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, %edx
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %esi
	shrl	%esi
	incl	%ecx
	movl	%ecx, (%rbx)
	cmpl	$131071, %eax                   ## imm = 0x1FFFF
	movl	%esi, %eax
	ja	LBB0_10
	jmp	LBB0_13
LBB0_7:
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_11:
	movl	%edx, %ecx
LBB0_13:
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%r12d, %eax
	jae	LBB0_17
## %bb.14:
	movl	16(%rbp), %r13d
	movq	_TCP_DEFAULT_INIT_RCVWND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$1461, %r12d                    ## imm = 0x5B5
	jb	LBB0_16
## %bb.15:
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	imull	$1460, %esi, %eax               ## imm = 0x5B4
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %esi
	movl	$2, %edx
	callq	_max_t
	movq	%rax, %rsi
LBB0_16:
	testl	%r13d, %r13d
	movl	(%r15), %edi
	cmovnel	%r13d, %esi
	imull	%r12d, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	%eax, (%r15)
	movl	(%rbx), %ecx
LBB0_17:
	movl	$65535, %edi                    ## imm = 0xFFFF
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	movl	(%r14), %esi
	callq	_min
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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
	.comm	_u32,4,2                        ## @u32
	.comm	_sysctl_tcp_rmem,8,3            ## @sysctl_tcp_rmem
	.comm	_sysctl_rmem_max,4,2            ## @sysctl_rmem_max
	.comm	_TCP_DEFAULT_INIT_RCVWND,4,2    ## @TCP_DEFAULT_INIT_RCVWND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_select_initial_window      ; -- Begin function tcp_select_initial_window
	.p2align	2
_tcp_select_initial_window:             ; @tcp_select_initial_window
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x6
	mov	x20, x5
	mov	x24, x4
	mov	x19, x3
	mov	x21, x2
	mov	x23, x1
	mov	x8, x0
	ldr	w0, [x3]
	cmp	w8, #0
	csel	w1, w8, wzr, gt
	cbnz	w0, LBB0_2
; %bb.1:
	mov	w0, #1073725440
	str	w0, [x19]
LBB0_2:
	bl	_min
	cmp	w0, w23
	b.ls	LBB0_4
; %bb.3:
	udiv	w8, w0, w23
	mul	w0, w8, w23
LBB0_4:
Lloh0:
	adrp	x8, _sysctl_tcp_workaround_signed_windows@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sysctl_tcp_workaround_signed_windows@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _MAX_TCP_WINDOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_TCP_WINDOW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_min
LBB0_6:
	str	w0, [x21]
	str	wzr, [x20]
	cbz	w24, LBB0_11
; %bb.7:
Lloh6:
	adrp	x24, _u32@GOTPAGE
Lloh7:
	ldr	x24, [x24, _u32@GOTPAGEOFF]
Lloh8:
	adrp	x8, _sysctl_tcp_rmem@GOTPAGE
Lloh9:
	ldr	x8, [x8, _sysctl_tcp_rmem@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh10:
	ldr	x8, [x8]
	ldr	w1, [x8, #8]
Lloh11:
	adrp	x8, _sysctl_rmem_max@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sysctl_rmem_max@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_max_t
	mov	x1, x0
	ldr	w0, [x24]
	ldr	w2, [x19]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_min_t
	ldr	w8, [x20]
	cmp	w0, #16, lsl #12                ; =65536
	b.lo	LBB0_13
; %bb.8:
	mov	w9, #14
	cmp	w8, #14
	csel	w9, w8, w9, gt
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, w8
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	lsr	w10, w0, #17
	lsr	w0, w0, #1
	add	w8, w8, #1
	str	w8, [x20]
	cbnz	w10, LBB0_9
	b	LBB0_13
LBB0_11:
	mov	w8, #0
	b	LBB0_13
LBB0_12:
	mov	x8, x9
LBB0_13:
	mov	w9, #1
	lsl	w9, w9, w8
	cmp	w9, w23
	b.hs	LBB0_17
; %bb.14:
Lloh14:
	adrp	x8, _TCP_DEFAULT_INIT_RCVWND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TCP_DEFAULT_INIT_RCVWND@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	cmp	w23, #1461
	b.lo	LBB0_16
; %bb.15:
Lloh17:
	adrp	x8, _u32@GOTPAGE
Lloh18:
	ldr	x8, [x8, _u32@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	mov	w9, #1460
	mul	w9, w0, w9
	udiv	w1, w9, w23
	mov	x0, x8
	mov	w2, #2
	bl	_max_t
LBB0_16:
	ldr	w8, [x21]
	cmp	w22, #0
	csel	w9, w0, w22, eq
	mul	w1, w9, w23
	mov	x0, x8
	bl	_min
	str	w0, [x21]
	ldr	w8, [x20]
LBB0_17:
	mov	w9, #65535
	lsl	w0, w9, w8
	ldr	w1, [x19]
	bl	_min
	str	w0, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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
	.comm	_u32,4,2                        ; @u32
	.comm	_sysctl_tcp_rmem,8,3            ; @sysctl_tcp_rmem
	.comm	_sysctl_rmem_max,4,2            ; @sysctl_rmem_max
	.comm	_TCP_DEFAULT_INIT_RCVWND,4,2    ; @TCP_DEFAULT_INIT_RCVWND
.subsections_via_symbols
