	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_pending                  ## -- Begin function write_pending
	.p2align	4, 0x90
_write_pending:                         ## @write_pending
	.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
	xorl	%edi, %edi
	cmpq	$0, 32(%rbx)
	setne	%dil
	callq	_assert
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.1:
	leaq	8(%rbx), %r15
	movl	24(%rbx), %edi
	leaq	16(%rbx), %r14
	leaq	-32(%rbp), %rcx
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_write_core
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_wreq_free_buffer_if_allocated
LBB0_5:
	movq	_H2O_SOCKET_FLAG_IS_WRITE_NOTIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_link_to_pending
	movq	%rbx, %rdi
	callq	_link_to_statechanged
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	cmpq	$0, (%r15)
	je	LBB0_4
## %bb.3:
	movq	-32(%rbp), %rax
	movq	(%r14), %rcx
	addq	%rax, (%rcx)
	movq	-32(%rbp), %rax
	subq	%rax, 8(%rcx)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_H2O_SOCKET_FLAG_IS_WRITE_NOTIFY,4,2 ## @H2O_SOCKET_FLAG_IS_WRITE_NOTIFY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_pending                  ; -- Begin function write_pending
	.p2align	2
_write_pending:                         ; @write_pending
	.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
	ldr	x8, [x0, #32]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	mov	x21, x19
	ldr	x8, [x21, #8]!
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w0, [x19, #24]
	add	x20, x19, #16
	add	x3, sp, #8
	mov	x1, x20
	mov	x2, x21
	bl	_write_core
	cbz	x0, LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_wreq_free_buffer_if_allocated
LBB0_3:
Lloh0:
	adrp	x8, _H2O_SOCKET_FLAG_IS_WRITE_NOTIFY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _H2O_SOCKET_FLAG_IS_WRITE_NOTIFY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_link_to_pending
	mov	x0, x19
	bl	_link_to_statechanged
LBB0_4:
	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_5:
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.6:
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	ldp	x10, x11, [x9]
	add	x8, x10, x8
	str	x8, [x9]
	ldr	x8, [sp, #8]
	sub	x8, x11, x8
	str	x8, [x9, #8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_H2O_SOCKET_FLAG_IS_WRITE_NOTIFY,4,2 ; @H2O_SOCKET_FLAG_IS_WRITE_NOTIFY
.subsections_via_symbols
