	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcpip_write                    ## -- Begin function tcpip_write
	.p2align	4, 0x90
_tcpip_write:                           ## @tcpip_write
	.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	%rdx, %r15
	movq	%rsi, %r14
	callq	_tcpip_getsocket
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	testq	%r15, %r15
	jle	LBB0_11
## %bb.3:
	movq	%rax, %r12
	movq	_UIP_ERR_OK@GOTPCREL(%rip), %r13
	jmp	LBB0_4
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	callq	_uip_tcpoutput
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %r14
	subq	%rbx, %r15
	jle	LBB0_11
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	___tcpip_poll
	movq	(%r12), %rdi
	callq	_uip_tcp_sndbuf
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	cmpq	%rax, %r15
	cmovlq	%r15, %rbx
	movq	(%r12), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_uip_tcp_write
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r12), %rdi
	cmpl	$0, 8(%rdi)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_UIP_TF_NODELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2, 4(%rdi)
	jge	LBB0_9
	jmp	LBB0_10
LBB0_11:
	movq	_UIP_ERR_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_1:
	movl	$-1, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UIP_ERR_OK,8,3                 ## @UIP_ERR_OK
	.comm	_UIP_TF_NODELAY,4,2             ## @UIP_TF_NODELAY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcpip_write                    ; -- Begin function tcpip_write
	.p2align	2
_tcpip_write:                           ; @tcpip_write
	.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	x19, x2
	mov	x20, x1
	bl	_tcpip_getsocket
	cbz	x0, LBB0_11
; %bb.1:
Lloh0:
	adrp	x23, _UIP_ERR_OK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _UIP_ERR_OK@GOTPAGEOFF]
	cmp	x19, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x21, x0
Lloh2:
	adrp	x24, _UIP_TF_NODELAY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _UIP_TF_NODELAY@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_uip_tcpoutput
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, x22
	sub	x19, x19, x22
	cmp	x19, #0
	b.le	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bl	___tcpip_poll
	ldr	x0, [x21]
	bl	_uip_tcp_sndbuf
	cbz	x0, LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x19, x0
	csel	x22, x19, x0, lt
	ldr	x0, [x21]
	mov	x1, x20
	mov	x2, x22
	mov	w3, #1
	bl	_uip_tcp_write
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x21]
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x0]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x0, #4]
	cmp	w8, #2
	b.ge	LBB0_3
	b	LBB0_4
LBB0_10:
	ldr	w0, [x23]
	b	LBB0_12
LBB0_11:
	mov	w0, #-1
LBB0_12:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_UIP_ERR_OK,8,3                 ; @UIP_ERR_OK
	.comm	_UIP_TF_NODELAY,4,2             ; @UIP_TF_NODELAY
.subsections_via_symbols
