	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_chunked
_encode_chunked:                        ## @encode_chunked
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_h2o_iovec_init
	movq	%rax, (%rbx)
	movl	%edx, 8(%rbx)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_h2o_iovec_init
	movq	%rax, (%r12)
	movl	%edx, 8(%r12)
	testq	%r13, %r13
	je	LBB0_3
## %bb.1:
	movq	%r15, (%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_sprintf
	movl	%eax, 8(%rbx)
	movq	_H2O_SEND_STATE_ERROR@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	je	LBB0_6
## %bb.2:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r12)
	movq	_H2O_SEND_STATE_FINAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%cl
	cmpq	%r14, (%rax)
	leal	5(%rcx,%rcx), %ecx
	movl	$2, %eax
	cmovel	%ecx, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_H2O_SEND_STATE_FINAL@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%r12)
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	addl	%eax, %eax
	addl	$3, %eax
LBB0_5:
	movl	%eax, 8(%r12)
LBB0_6:
	movq	_H2O_SEND_STATE_ERROR@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rax
	movq	%rax, (%r12)
	movl	$5, 8(%r12)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%zx\r\n"

	.comm	_H2O_SEND_STATE_ERROR,8,3       ## @H2O_SEND_STATE_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"\r\n0\r\n\r\n"

	.comm	_H2O_SEND_STATE_FINAL,8,3       ## @H2O_SEND_STATE_FINAL
L_.str.2:                               ## @.str.2
	.asciz	"0\r\n\r\n"

L_.str.3:                               ## @.str.3
	.asciz	"\r\n1\r\n"

	.no_dead_strip	_encode_chunked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_chunked
_encode_chunked:                        ; @encode_chunked
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x5
	mov	x21, x4
	mov	x23, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	mov	x0, #0
	mov	w1, #0
	bl	_h2o_iovec_init
	stp	x0, x1, [x22]
	mov	x0, #0
	mov	w1, #0
	bl	_h2o_iovec_init
	stp	x0, x1, [x19]
Lloh0:
	adrp	x25, _H2O_SEND_STATE_ERROR@GOTPAGE
Lloh1:
	ldr	x25, [x25, _H2O_SEND_STATE_ERROR@GOTPAGEOFF]
	cbz	x23, LBB0_3
; %bb.1:
	str	x24, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x23
	bl	_sprintf
	str	w0, [x22, #8]
	ldr	x8, [x25]
	cmp	x8, x20
	b.eq	LBB0_6
; %bb.2:
Lloh4:
	adrp	x8, l_.str.1@PAGE
Lloh5:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x19]
Lloh6:
	adrp	x8, _H2O_SEND_STATE_FINAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _H2O_SEND_STATE_FINAL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	w9, #5
	mov	w10, #7
	cmp	w21, #0
	csel	w9, w10, w9, eq
	cmp	x8, x20
	mov	w8, #2
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _H2O_SEND_STATE_FINAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _H2O_SEND_STATE_FINAL@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, l_.str.2@PAGE
Lloh13:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x19]
	mov	w8, #3
	mov	w9, #5
	cmp	w21, #0
LBB0_5:
	csel	w8, w9, w8, eq
	str	w8, [x19, #8]
LBB0_6:
	ldr	x8, [x25]
	cmp	x8, x20
	b.ne	LBB0_8
; %bb.7:
Lloh14:
	adrp	x8, l_.str.3@PAGE
Lloh15:
	add	x8, x8, l_.str.3@PAGEOFF
	str	x8, [x19]
	mov	w8, #5
	str	w8, [x19, #8]
LBB0_8:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%zx\r\n"

	.comm	_H2O_SEND_STATE_ERROR,8,3       ; @H2O_SEND_STATE_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"\r\n0\r\n\r\n"

	.comm	_H2O_SEND_STATE_FINAL,8,3       ; @H2O_SEND_STATE_FINAL
l_.str.2:                               ; @.str.2
	.asciz	"0\r\n\r\n"

l_.str.3:                               ; @.str.3
	.asciz	"\r\n1\r\n"

	.no_dead_strip	_encode_chunked
.subsections_via_symbols
