	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcp_init_buffer_space
_tcp_init_buffer_space:                 ## @tcp_init_buffer_space
	.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, %rbx
	callq	_tcp_sk
	movq	%rax, %r15
	movl	(%rbx), %eax
	movq	_SOCK_RCVBUF_LOCK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_tcp_fixup_rcvbuf
	movl	(%rbx), %eax
LBB0_2:
	movq	_SOCK_SNDBUF_LOCK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_tcp_fixup_sndbuf
LBB0_4:
	movl	16(%r15), %eax
	movl	%eax, 20(%r15)
	movq	%rbx, %rdi
	callq	_tcp_full_space
	movl	%eax, %r14d
	movl	(%r15), %esi
	cmpl	%eax, %esi
	jl	LBB0_9
## %bb.5:
	movl	%r14d, (%r15)
	movq	_sysctl_tcp_app_win@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.7:
	movl	4(%r15), %eax
	shll	$2, %eax
	movl	%r14d, %esi
	cmpl	%eax, %r14d
	jle	LBB0_9
## %bb.8:
	movl	%r14d, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movl	%r14d, %edi
	subl	%edx, %edi
	movl	%eax, %esi
	callq	_max
	movq	%rax, %rsi
	movl	%esi, (%r15)
LBB0_9:
	movq	_sysctl_tcp_app_win@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_13
## %bb.10:
	movl	4(%r15), %eax
	leal	(%rax,%rax), %edi
	cmpl	%edi, %esi
	jle	LBB0_13
## %bb.11:
	leal	(%rax,%rsi), %ecx
	cmpl	%r14d, %ecx
	jle	LBB0_13
## %bb.12:
	subl	%eax, %r14d
	movl	%r14d, %esi
	callq	_max
	movq	%rax, %rsi
	movl	%esi, (%r15)
	jmp	LBB0_13
LBB0_6:
	movl	%r14d, %esi
LBB0_13:
	movl	12(%r15), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	%eax, 12(%r15)
	movq	_tcp_time_stamp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_RCVBUF_LOCK,4,2           ## @SOCK_RCVBUF_LOCK
	.comm	_SOCK_SNDBUF_LOCK,4,2           ## @SOCK_SNDBUF_LOCK
	.comm	_sysctl_tcp_app_win,4,2         ## @sysctl_tcp_app_win
	.comm	_tcp_time_stamp,4,2             ## @tcp_time_stamp
	.no_dead_strip	_tcp_init_buffer_space
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcp_init_buffer_space
_tcp_init_buffer_space:                 ; @tcp_init_buffer_space
	.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	x20, x0
	bl	_tcp_sk
	mov	x19, x0
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _SOCK_RCVBUF_LOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SOCK_RCVBUF_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_tcp_fixup_rcvbuf
	ldr	w8, [x20]
LBB0_2:
Lloh3:
	adrp	x9, _SOCK_SNDBUF_LOCK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SOCK_SNDBUF_LOCK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_tcp_fixup_sndbuf
LBB0_4:
	ldr	w8, [x19, #16]
	str	w8, [x19, #20]
	mov	x0, x20
	bl	_tcp_full_space
	mov	x20, x0
	ldr	w1, [x19]
Lloh6:
	adrp	x21, _sysctl_tcp_app_win@GOTPAGE
Lloh7:
	ldr	x21, [x21, _sysctl_tcp_app_win@GOTPAGEOFF]
	cmp	w1, w0
	b.lt	LBB0_8
; %bb.5:
	str	w20, [x19]
	ldr	w9, [x21]
	cbz	w9, LBB0_11
; %bb.6:
	ldr	w8, [x19, #4]
	lsl	w8, w8, #2
	mov	x1, x20
	cmp	w20, w8
	b.le	LBB0_8
; %bb.7:
	asr	w9, w20, w9
	sub	w0, w20, w9
	mov	x1, x8
	bl	_max
	mov	x1, x0
	str	w1, [x19]
LBB0_8:
	ldr	w8, [x21]
	cbz	w8, LBB0_12
; %bb.9:
	ldr	w8, [x19, #4]
	lsl	w0, w8, #1
	add	w9, w8, w1
	cmp	w1, w0
	ccmp	w9, w20, #4, gt
	b.le	LBB0_12
; %bb.10:
	sub	w1, w20, w8
	bl	_max
	str	w0, [x19]
	mov	x1, x0
	b	LBB0_12
LBB0_11:
	mov	x1, x20
LBB0_12:
	ldr	w0, [x19, #12]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_min
Lloh8:
	adrp	x8, _tcp_time_stamp@GOTPAGE
Lloh9:
	ldr	x8, [x8, _tcp_time_stamp@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	stp	w8, w0, [x19, #8]
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_RCVBUF_LOCK,4,2           ; @SOCK_RCVBUF_LOCK
	.comm	_SOCK_SNDBUF_LOCK,4,2           ; @SOCK_SNDBUF_LOCK
	.comm	_sysctl_tcp_app_win,4,2         ; @sysctl_tcp_app_win
	.comm	_tcp_time_stamp,4,2             ; @tcp_time_stamp
	.no_dead_strip	_tcp_init_buffer_space
.subsections_via_symbols
