	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_emit_writereq               ## -- Begin function do_emit_writereq
	.p2align	4, 0x90
_do_emit_writereq:                      ## @do_emit_writereq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, 48(%rbx)
	sete	%dil
	callq	_assert
	cmpl	$128, (%rbx)
	jg	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_h2o_http2_conn_get_buffer_window
	testq	%rax, %rax
	jle	LBB0_3
## %bb.2:
	leaq	60(%rbx), %rdi
	movq	_emit_writereq_of_openref@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_h2o_http2_scheduler_run
LBB0_3:
	movq	40(%rbx), %rcx
	movq	(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	40(%rbx), %r14
	movslq	8(%rcx), %rcx
	movq	%rcx, -32(%rbp)
	movl	%eax, -24(%rbp)
	movl	56(%rbx), %edi
	movq	_on_write_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %rsi
	movl	$1, %edx
	callq	_h2o_socket_write
	movq	40(%rbx), %rax
	movq	%rax, 48(%rbx)
	movq	_h2o_http2_wbuf_buffer_prototype@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_h2o_buffer_init
	leaq	24(%rbx), %r14
	movq	%r14, %rdi
	callq	_h2o_timer_unlink
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	movq	_H2O_HTTP2_DEFAULT_OUTBUF_WRITE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_h2o_timer_link
LBB0_5:
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$130, %eax
	jne	LBB0_10
## %bb.7:
	movq	16(%rbx), %rax
	addq	8(%rbx), %rax
	jne	LBB0_10
## %bb.8:
	movl	$129, (%rbx)
LBB0_9:
	movq	%rbx, %rdi
	callq	_close_connection_now
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_emit_writereq_of_openref,4,2   ## @emit_writereq_of_openref
	.comm	_on_write_complete,4,2          ## @on_write_complete
	.comm	_h2o_http2_wbuf_buffer_prototype,4,2 ## @h2o_http2_wbuf_buffer_prototype
	.comm	_H2O_HTTP2_DEFAULT_OUTBUF_WRITE_TIMEOUT,4,2 ## @H2O_HTTP2_DEFAULT_OUTBUF_WRITE_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_emit_writereq               ; -- Begin function do_emit_writereq
	.p2align	2
_do_emit_writereq:                      ; @do_emit_writereq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #48]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19]
	cmp	w8, #128
	b.gt	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_h2o_http2_conn_get_buffer_window
	cmp	x0, #1
	b.lt	LBB0_3
; %bb.2:
	add	x0, x19, #60
Lloh0:
	adrp	x8, _emit_writereq_of_openref@GOTPAGE
Lloh1:
	ldr	x8, [x8, _emit_writereq_of_openref@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_h2o_http2_scheduler_run
LBB0_3:
	mov	x20, x19
	ldr	x9, [x20, #40]!
	ldr	x8, [x9]
	cbz	x8, LBB0_5
; %bb.4:
	ldrsw	x9, [x9, #8]
	str	x9, [sp]
	str	w8, [sp, #8]
	ldr	w0, [x19, #56]
Lloh3:
	adrp	x8, _on_write_complete@GOTPAGE
Lloh4:
	ldr	x8, [x8, _on_write_complete@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x1, sp
	mov	w2, #1
	bl	_h2o_socket_write
	ldr	x8, [x19, #40]
	str	x8, [x19, #48]
Lloh6:
	adrp	x1, _h2o_http2_wbuf_buffer_prototype@GOTPAGE
Lloh7:
	ldr	x1, [x1, _h2o_http2_wbuf_buffer_prototype@GOTPAGEOFF]
	mov	x0, x20
	bl	_h2o_buffer_init
	add	x20, x19, #24
	mov	x0, x20
	bl	_h2o_timer_unlink
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _H2O_HTTP2_DEFAULT_OUTBUF_WRITE_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H2O_HTTP2_DEFAULT_OUTBUF_WRITE_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_h2o_timer_link
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #130
	b.ne	LBB0_10
; %bb.7:
	ldp	x9, x8, [x19, #8]
	cmn	x8, x9
	b.ne	LBB0_10
; %bb.8:
	mov	w8, #129
	str	w8, [x19]
LBB0_9:
	mov	x0, x19
	bl	_close_connection_now
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_emit_writereq_of_openref,4,2   ; @emit_writereq_of_openref
	.comm	_on_write_complete,4,2          ; @on_write_complete
	.comm	_h2o_http2_wbuf_buffer_prototype,4,2 ; @h2o_http2_wbuf_buffer_prototype
	.comm	_H2O_HTTP2_DEFAULT_OUTBUF_WRITE_TIMEOUT,4,2 ; @H2O_HTTP2_DEFAULT_OUTBUF_WRITE_TIMEOUT
.subsections_via_symbols
