	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function internal_send
_internal_send:                         ## @internal_send
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	_ISC_SOCKEVENT_INTW@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_INSIST
	movq	8(%r12), %rbx
	movq	%rbx, -48(%rbp)
	movq	%rbx, %rdi
	callq	_VALID_SOCKET
	movl	%eax, %edi
	callq	_INSIST
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_LOCK
	movq	_IOEVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_isc_msgcat@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ISC_MSGSET_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_ISC_MSG_INTERNALSEND@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rax
	movq	%rbx, %rdi
	xorl	%esi, %esi
	pushq	%r12
	pushq	%r15
	pushq	%rax
	callq	_socket_log
	addq	$32, %rsp
	xorl	%edi, %edi
	cmpl	$1, (%rbx)
	sete	%dil
	callq	_INSIST
	movl	$0, (%rbx)
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setg	%dil
	callq	_INSIST
	decq	8(%rbx)
	je	LBB0_1
## %bb.2:
	movl	28(%rbx), %edi
	callq	_ISC_LIST_HEAD
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	leaq	-40(%rbp), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_send_senddone_event
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	28(%rbx), %edi
	callq	_ISC_LIST_HEAD
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_doio_send
	cmpl	$128, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$130, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$129, %eax
	jne	LBB0_8
LBB0_9:
	movl	28(%rbx), %edi
	callq	_ISC_LIST_EMPTY
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movl	20(%rbx), %esi
	movl	24(%rbx), %edi
	movq	_SELECT_POKE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_select_poke
LBB0_11:
	movq	%r14, %rdi
	callq	_UNLOCK
	jmp	LBB0_12
LBB0_1:
	movq	%r14, %rdi
	callq	_UNLOCK
	leaq	-48(%rbp), %rdi
	callq	_destroy
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISC_SOCKEVENT_INTW,8,3         ## @ISC_SOCKEVENT_INTW
	.comm	_IOEVENT,4,2                    ## @IOEVENT
	.comm	_isc_msgcat,4,2                 ## @isc_msgcat
	.comm	_ISC_MSGSET_SOCKET,4,2          ## @ISC_MSGSET_SOCKET
	.comm	_ISC_MSG_INTERNALSEND,4,2       ## @ISC_MSG_INTERNALSEND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"internal_send: task %p got event %p"

	.comm	_SELECT_POKE_WRITE,4,2          ## @SELECT_POKE_WRITE
	.no_dead_strip	_internal_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function internal_send
_internal_send:                         ; @internal_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x22, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _ISC_SOCKEVENT_INTW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ISC_SOCKEVENT_INTW@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_INSIST
	ldr	x20, [x21, #8]
	str	x20, [sp, #16]
	mov	x0, x20
	bl	_VALID_SOCKET
	bl	_INSIST
	add	x19, x20, #16
	mov	x0, x19
	bl	_LOCK
Lloh3:
	adrp	x8, _IOEVENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOEVENT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _isc_msgcat@GOTPAGE
Lloh7:
	ldr	x8, [x8, _isc_msgcat@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x8, _ISC_MSGSET_SOCKET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ISC_MSGSET_SOCKET@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _ISC_MSG_INTERNALSEND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ISC_MSG_INTERNALSEND@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
	str	x21, [sp]
Lloh15:
	adrp	x6, l_.str@PAGE
Lloh16:
	add	x6, x6, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, #0
	mov	x7, x22
	bl	_socket_log
	ldr	w8, [x20]
	cmp	w8, #1
	cset	w0, eq
	bl	_INSIST
	str	wzr, [x20]
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, gt
	bl	_INSIST
	ldr	x8, [x20, #8]
	subs	x8, x8, #1
	str	x8, [x20, #8]
	b.eq	LBB0_11
; %bb.1:
	ldr	w0, [x20, #28]
	bl	_ISC_LIST_HEAD
	str	x0, [sp, #24]
	cbz	x0, LBB0_8
; %bb.2:
	mov	x1, x0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #24
	mov	x0, x20
	bl	_send_senddone_event
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20, #28]
	bl	_ISC_LIST_HEAD
	mov	x1, x0
	str	x0, [sp, #24]
	cbz	x0, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_doio_send
	cmp	w0, #128
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w0, #130
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w0, #129
	b.ne	LBB0_4
LBB0_8:
	ldr	w0, [x20, #28]
	bl	_ISC_LIST_EMPTY
	cbnz	w0, LBB0_10
; %bb.9:
	ldp	w1, w0, [x20, #20]
Lloh17:
	adrp	x8, _SELECT_POKE_WRITE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SELECT_POKE_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	bl	_select_poke
LBB0_10:
	mov	x0, x19
	bl	_UNLOCK
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_UNLOCK
	add	x0, sp, #16
	bl	_destroy
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ISC_SOCKEVENT_INTW,8,3         ; @ISC_SOCKEVENT_INTW
	.comm	_IOEVENT,4,2                    ; @IOEVENT
	.comm	_isc_msgcat,4,2                 ; @isc_msgcat
	.comm	_ISC_MSGSET_SOCKET,4,2          ; @ISC_MSGSET_SOCKET
	.comm	_ISC_MSG_INTERNALSEND,4,2       ; @ISC_MSG_INTERNALSEND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"internal_send: task %p got event %p"

	.comm	_SELECT_POKE_WRITE,4,2          ; @SELECT_POKE_WRITE
	.no_dead_strip	_internal_send
.subsections_via_symbols
