	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_write
_do_write:                              ## @do_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$0, -28(%rbp)
	movq	(%rdi), %rax
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movl	(%rax), %ecx
	leal	-128(%rcx), %edx
	cmpl	$3, %edx
	jb	LBB0_4
## %bb.2:
	cmpl	$131, %ecx
	je	LBB0_5
## %bb.3:
	cmpl	$132, %ecx
	jne	LBB0_14
LBB0_4:
	movq	_ERR_VAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
LBB0_14:
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	movq	_MQ_MSG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rsi
	callq	_MQ_Send
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	16(%rbx), %esi
	movl	8(%rbx), %edx
	movl	12(%rbx), %ecx
	callq	_tcp_write
	movl	%eax, %r14d
	movq	_ERR_OK@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	%eax, %r14d
	jne	LBB0_10
## %bb.6:
	movq	(%rbx), %rax
	movq	16(%rax), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_9
## %bb.7:
	movq	_TF_NODELAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_9
## %bb.8:
	cmpl	$2, 4(%rax)
	movl	%r14d, %eax
	jl	LBB0_10
LBB0_9:
	movq	_API_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_LWIP_DEBUGF
	movq	(%rbx), %rax
	movq	16(%rax), %rdi
	callq	_tcp_output
	movl	(%r15), %eax
LBB0_10:
	movq	(%rbx), %rcx
	movl	%r14d, 24(%rcx)
	cmpq	$0, 8(%rcx)
	je	LBB0_14
## %bb.11:
	cmpl	%eax, %r14d
	jne	LBB0_14
## %bb.12:
	movq	16(%rcx), %rdi
	callq	_tcp_sndbuf
	movq	_TCP_SNDLOWAT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_14
## %bb.13:
	movq	(%rbx), %rdi
	movq	_NETCONN_EVTSENDMINUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	callq	*8(%rdi)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_VAL,4,2                    ## @ERR_VAL
	.comm	_ERR_OK,4,2                     ## @ERR_OK
	.comm	_TF_NODELAY,4,2                 ## @TF_NODELAY
	.comm	_API_MSG_DEBUG,4,2              ## @API_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"api_msg: TCP write: tcp_output.\n"

	.comm	_TCP_SNDLOWAT,4,2               ## @TCP_SNDLOWAT
	.comm	_NETCONN_EVTSENDMINUS,4,2       ## @NETCONN_EVTSENDMINUS
	.comm	_MQ_MSG_BLOCK,4,2               ## @MQ_MSG_BLOCK
	.no_dead_strip	_do_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_write
_do_write:                              ; @do_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	x8, [x0]
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w9, [x8]
	sub	w10, w9, #128
	cmp	w10, #3
	b.lo	LBB0_4
; %bb.2:
	cmp	w9, #131
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, #132
	b.ne	LBB0_5
LBB0_4:
Lloh0:
	adrp	x9, _ERR_VAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ERR_VAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8, #24]
LBB0_5:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
Lloh3:
	adrp	x8, _MQ_MSG_BLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MQ_MSG_BLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_MQ_Send
	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
	add	sp, sp, #64
	ret
LBB0_6:
	ldp	w3, w1, [x19, #12]
	ldr	w2, [x19, #8]
	bl	_tcp_write
	mov	x20, x0
Lloh6:
	adrp	x21, _ERR_OK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _ERR_OK@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.7:
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_10
; %bb.8:
	ldr	w9, [x8]
Lloh8:
	adrp	x10, _TF_NODELAY@GOTPAGE
Lloh9:
	ldr	x10, [x10, _TF_NODELAY@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_10
; %bb.9:
	ldr	w9, [x8, #4]
	mov	x8, x20
	cmp	w9, #2
	b.lt	LBB0_11
LBB0_10:
Lloh11:
	adrp	x8, _API_MSG_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _API_MSG_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_LWIP_DEBUGF
	ldr	x8, [x19]
	ldr	x0, [x8, #16]
	bl	_tcp_output
	ldr	w8, [x21]
LBB0_11:
	ldr	x9, [x19]
	str	w20, [x9, #24]
	ldr	x10, [x9, #8]
	cmp	x10, #0
	ccmp	w20, w8, #0, ne
	b.ne	LBB0_5
; %bb.12:
	ldr	x0, [x9, #16]
	bl	_tcp_sndbuf
Lloh16:
	adrp	x8, _TCP_SNDLOWAT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TCP_SNDLOWAT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.gt	LBB0_5
; %bb.13:
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
Lloh19:
	adrp	x9, _NETCONN_EVTSENDMINUS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NETCONN_EVTSENDMINUS@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x9]
	ldr	w2, [x19, #8]
	blr	x8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_VAL,4,2                    ; @ERR_VAL
	.comm	_ERR_OK,4,2                     ; @ERR_OK
	.comm	_TF_NODELAY,4,2                 ; @TF_NODELAY
	.comm	_API_MSG_DEBUG,4,2              ; @API_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"api_msg: TCP write: tcp_output.\n"

	.comm	_TCP_SNDLOWAT,4,2               ; @TCP_SNDLOWAT
	.comm	_NETCONN_EVTSENDMINUS,4,2       ; @NETCONN_EVTSENDMINUS
	.comm	_MQ_MSG_BLOCK,4,2               ; @MQ_MSG_BLOCK
	.no_dead_strip	_do_write
.subsections_via_symbols
