	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_sndbuf_autoscale           ## -- Begin function tcp_sndbuf_autoscale
	.p2align	4, 0x90
_tcp_sndbuf_autoscale:                  ## @tcp_sndbuf_autoscale
	.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	_V_tcp_do_autosndbuf@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.1:
	movq	%rsi, %rbx
	movq	_SB_AUTOSIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, (%rsi)
	je	LBB0_11
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	_V_tcp_sendbuf_auto_lowat@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	movl	4(%rbx), %r13d
	jmp	LBB0_5
LBB0_3:
	xorl	%r13d, %r13d
LBB0_5:
	movl	(%r15), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	leal	(%rcx,%rcx,4), %eax
	movl	8(%rbx), %ecx
	subl	%r13d, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	callq	_sbused
	movl	8(%rbx), %ecx
	leal	7(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	movl	%edx, %ecx
	sarl	$3, %ecx
	andl	$-8, %edx
	subl	%ecx, %edx
	subl	%r13d, %edx
	movslq	%edx, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_11
## %bb.7:
	movq	%rbx, %rdi
	callq	_sbused
	movq	_V_tcp_autosndbuf_max@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jge	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	callq	_sbused
	subq	8(%r15), %rax
	addq	16(%r15), %rax
	cmpq	%r14, %rax
	jg	LBB0_11
## %bb.9:
	movslq	8(%rbx), %rdi
	movq	_V_tcp_autosndbuf_inc@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movq	(%r13), %rsi
	callq	_min
	movq	_curthread@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_sbreserve_locked
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%rbx)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V_tcp_do_autosndbuf,8,3        ## @V_tcp_do_autosndbuf
	.comm	_SB_AUTOSIZE,4,2                ## @SB_AUTOSIZE
	.comm	_V_tcp_sendbuf_auto_lowat,8,3   ## @V_tcp_sendbuf_auto_lowat
	.comm	_V_tcp_autosndbuf_max,8,3       ## @V_tcp_autosndbuf_max
	.comm	_V_tcp_autosndbuf_inc,8,3       ## @V_tcp_autosndbuf_inc
	.comm	_curthread,4,2                  ## @curthread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_sndbuf_autoscale           ; -- Begin function tcp_sndbuf_autoscale
	.p2align	2
_tcp_sndbuf_autoscale:                  ; @tcp_sndbuf_autoscale
	.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
Lloh0:
	adrp	x8, _V_tcp_do_autosndbuf@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_tcp_do_autosndbuf@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1]
Lloh3:
	adrp	x22, _SB_AUTOSIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SB_AUTOSIZE@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.2:
	mov	x20, x2
	mov	x21, x0
Lloh5:
	adrp	x8, _V_tcp_sendbuf_auto_lowat@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V_tcp_sendbuf_auto_lowat@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w23, [x19, #4]
	b	LBB0_5
LBB0_4:
	mov	w23, #0
LBB0_5:
	ldr	w8, [x21]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	and	w9, w8, #0xfffffffc
	add	w8, w9, w8, asr #2
	ldr	w9, [x19, #8]
	sub	w9, w9, w23
	cmp	w8, w9
	b.lt	LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_sbused
	ldr	w8, [x19, #8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	and	w9, w8, #0xfffffff8
	sub	w8, w9, w8, asr #3
	sub	w8, w8, w23
	cmp	x0, w8, sxtw
	b.lt	LBB0_11
; %bb.7:
	mov	x0, x19
	bl	_sbused
Lloh8:
	adrp	x23, _V_tcp_autosndbuf_max@GOTPAGE
Lloh9:
	ldr	x23, [x23, _V_tcp_autosndbuf_max@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ge	LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_sbused
	ldp	x8, x9, [x21, #8]
	sub	x8, x0, x8
	add	x8, x8, x9
	cmp	x8, x20
	b.gt	LBB0_11
; %bb.9:
	ldrsw	x8, [x19, #8]
Lloh10:
	adrp	x9, _V_tcp_autosndbuf_inc@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V_tcp_autosndbuf_inc@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	x1, [x23]
	bl	_min
	mov	x1, x0
Lloh13:
	adrp	x8, _curthread@GOTPAGE
Lloh14:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x2, x19
	bl	_sbreserve_locked
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_11:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_V_tcp_do_autosndbuf,8,3        ; @V_tcp_do_autosndbuf
	.comm	_SB_AUTOSIZE,4,2                ; @SB_AUTOSIZE
	.comm	_V_tcp_sendbuf_auto_lowat,8,3   ; @V_tcp_sendbuf_auto_lowat
	.comm	_V_tcp_autosndbuf_max,8,3       ; @V_tcp_autosndbuf_max
	.comm	_V_tcp_autosndbuf_inc,8,3       ; @V_tcp_autosndbuf_inc
	.comm	_curthread,4,2                  ; @curthread
.subsections_via_symbols
