	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_write                   ## -- Begin function server_write
	.p2align	4, 0x90
_server_write:                          ## @server_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_latopt_cond@GOTPCREL(%rip), %rsi
	callq	_h2o_socket_prepare_for_latency_optimized_write
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_prepare_write_buf
	movq	%rax, -32(%rbp)
	movq	%rdx, -24(%rbp)
	movq	_server_flag_received@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_2
## %bb.1:
	movb	$49, (%rax)
	movq	-24(%rbp), %rdx
LBB0_2:
	cmpq	%rdx, %rbx
	jae	LBB0_4
## %bb.3:
	movq	%rbx, -24(%rbp)
	movq	%rbx, %rdx
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	_server_on_write_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_h2o_socket_write
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_latopt_cond,4,2                ## @latopt_cond
	.comm	_server_flag_received,8,3       ## @server_flag_received
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"writing %zu bytes\n"

	.comm	_server_on_write_complete,4,2   ## @server_on_write_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_write                   ; -- Begin function server_write
	.p2align	2
_server_write:                          ; @server_write
	.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
Lloh0:
	adrp	x1, _latopt_cond@GOTPAGE
Lloh1:
	ldr	x1, [x1, _latopt_cond@GOTPAGEOFF]
	bl	_h2o_socket_prepare_for_latency_optimized_write
	mov	x20, x0
	bl	_prepare_write_buf
	stp	x0, x1, [sp]
Lloh2:
	adrp	x8, _server_flag_received@GOTPAGE
Lloh3:
	ldr	x8, [x8, _server_flag_received@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	w8, #49
	strb	w8, [x0]
	ldr	x2, [sp, #8]
	cmp	x20, x2
	b.hs	LBB0_3
LBB0_2:
	str	x20, [sp, #8]
	mov	x2, x20
LBB0_3:
Lloh5:
	adrp	x8, _stderr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh10:
	adrp	x8, _server_on_write_complete@GOTPAGE
Lloh11:
	ldr	x8, [x8, _server_on_write_complete@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #1
	bl	_h2o_socket_write
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	x2, x1
	cmp	x20, x2
	b.lo	LBB0_2
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_latopt_cond,4,2                ; @latopt_cond
	.comm	_server_flag_received,8,3       ; @server_flag_received
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"writing %zu bytes\n"

	.comm	_server_on_write_complete,4,2   ; @server_on_write_complete
.subsections_via_symbols
