	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_write_req
_do_write_req:                          ## @do_write_req
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%ecx, (%rdi)
	leaq	40(%rdi), %r15
	cmpq	$0, 40(%rdi)
	je	LBB0_1
## %bb.2:
	testq	%rbx, %rbx
	jne	LBB0_3
	jmp	LBB0_5
LBB0_1:
	movq	_h2o_socket_buffer_prototype@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_h2o_buffer_init
	testq	%rbx, %rbx
	je	LBB0_5
LBB0_3:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_h2o_buffer_try_append
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	movq	56(%r13), %rax
	movq	_STREAM_STATE_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	$0, 48(%r13)
LBB0_7:
	movl	4(%r13), %edi
	callq	_h2o_socket_is_writing
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_17
## %bb.8:
	leaq	32(%r13), %r12
	movq	32(%r13), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	jmp	LBB0_11
LBB0_4:
	movl	$-1, %r14d
	jmp	LBB0_17
LBB0_9:
	movl	$1, %edi
LBB0_11:
	callq	_assert
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_swap_buffers
	movq	(%r12), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.13:
	movl	8(%rax), %edi
	callq	_h2o_iovec_init
	movq	%rax, -120(%rbp)
	movl	%edx, -112(%rbp)
	cmpq	$0, 24(%r13)
	je	LBB0_15
## %bb.14:
	movl	%edx, %ecx
	leaq	-96(%rbp), %rbx
	leaq	-104(%rbp), %r8
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_encode_chunk
	movdqu	8(%r13), %xmm0
	movq	-104(%rbp), %xmm1               ## xmm1 = mem[0],zero
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 8(%r13)
	movl	4(%r13), %edi
	movq	_on_req_body_done@GOTPCREL(%rip), %rcx
	movq	%rbx, %rsi
	movl	%eax, %edx
	jmp	LBB0_16
LBB0_12:
	movl	4(%r13), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_on_req_body_done
	jmp	LBB0_17
LBB0_15:
	movdqu	8(%r13), %xmm0
	movq	%rax, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 8(%r13)
	movl	4(%r13), %edi
	movq	_on_req_body_done@GOTPCREL(%rip), %rcx
	leaq	-120(%rbp), %rsi
	movl	$1, %edx
LBB0_16:
	callq	_h2o_socket_write
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movl	%r14d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_h2o_socket_buffer_prototype,4,2 ## @h2o_socket_buffer_prototype
	.comm	_STREAM_STATE_CLOSED,8,3        ## @STREAM_STATE_CLOSED
	.no_dead_strip	_do_write_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_write_req
_do_write_req:                          ; @do_write_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	w3, [x0]
	mov	x20, x0
	ldr	x8, [x20, #40]!
	cbz	x8, LBB0_2
; %bb.1:
	cbnz	x21, LBB0_3
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x1, _h2o_socket_buffer_prototype@GOTPAGE
Lloh4:
	ldr	x1, [x1, _h2o_socket_buffer_prototype@GOTPAGEOFF]
	mov	x0, x20
	bl	_h2o_buffer_init
	cbz	x21, LBB0_4
LBB0_3:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_h2o_buffer_try_append
	cbz	w0, LBB0_9
LBB0_4:
	ldr	x8, [x19, #56]
Lloh5:
	adrp	x9, _STREAM_STATE_CLOSED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _STREAM_STATE_CLOSED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	str	xzr, [x19, #48]
LBB0_6:
	ldr	w0, [x19, #4]
	bl	_h2o_socket_is_writing
	cbnz	x0, LBB0_17
; %bb.7:
	mov	x21, x19
	ldr	x8, [x21, #32]!
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_11
LBB0_9:
	mov	w0, #-1
	b	LBB0_18
LBB0_10:
	mov	w0, #1
LBB0_11:
	bl	_assert
	mov	x0, x20
	mov	x1, x21
	bl	_swap_buffers
	ldr	x8, [x21]
	ldr	x1, [x8]
	cbz	x1, LBB0_14
; %bb.12:
	ldr	w0, [x8, #8]
	bl	_h2o_iovec_init
	mov	x2, x0
	stp	x0, x1, [sp, #8]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_15
; %bb.13:
	mov	x3, x1
	mov	x20, sp
	add	x1, sp, #24
	mov	x4, sp
	mov	x0, x19
	bl	_encode_chunk
	mov	x2, x0
	ldur	q0, [x19, #8]
	ld1r.2d	{ v1 }, [x20]
	add.2d	v0, v0, v1
	stur	q0, [x19, #8]
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x3, _on_req_body_done@GOTPAGE
Lloh9:
	ldr	x3, [x3, _on_req_body_done@GOTPAGEOFF]
	add	x1, sp, #24
                                        ; kill: def $w2 killed $w2 killed $x2
	b	LBB0_16
LBB0_14:
	ldr	w0, [x19, #4]
	bl	_on_req_body_done
	b	LBB0_17
LBB0_15:
	ldur	q0, [x19, #8]
	dup.2d	v1, x2
	add.2d	v0, v0, v1
	stur	q0, [x19, #8]
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x3, _on_req_body_done@GOTPAGE
Lloh11:
	ldr	x3, [x3, _on_req_body_done@GOTPAGEOFF]
	add	x1, sp, #8
	mov	w2, #1
LBB0_16:
	bl	_h2o_socket_write
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_h2o_socket_buffer_prototype,4,2 ; @h2o_socket_buffer_prototype
	.comm	_STREAM_STATE_CLOSED,8,3        ; @STREAM_STATE_CLOSED
	.no_dead_strip	_do_write_req
.subsections_via_symbols
