	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encode_chunk                   ## -- Begin function encode_chunk
	.p2align	4, 0x90
_encode_chunk:                          ## @encode_chunk
	.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	%r8, %r14
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	$0, (%r8)
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rdx
	movl	$8, %esi
	movl	%r15d, %ecx
	callq	_snprintf
	movl	%eax, (%r12)
	cltq
	addq	%rax, (%r14)
	movq	(%r13), %rax
	movq	%rax, 8(%r12)
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_h2o_iovec_init
	movl	%eax, 16(%r12)
	movq	%rdx, 24(%r12)
	movslq	%r15d, %rax
	addq	%rax, (%r14)
	movl	$2, %ebx
	jmp	LBB0_3
LBB0_1:
	movl	$1, %ebx
LBB0_3:
	leaq	1(%rbx), %r15
	leaq	L_.str.1(%rip), %rdi
	movl	$2, %esi
	callq	_h2o_iovec_init
	shlq	$4, %rbx
	movl	%eax, (%r12,%rbx)
	movq	%rdx, 8(%r12,%rbx)
	addq	$2, (%r14)
	movq	%r15, %rax
	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"

L_.str.1:                               ## @.str.1
	.asciz	"\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encode_chunk                   ; -- Begin function encode_chunk
	.p2align	2
_encode_chunk:                          ; @encode_chunk
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
	str	xzr, [x4]
	ldr	x0, [x0]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #8
	mov	x3, x21
	bl	_snprintf
	str	w0, [x20]
	ldr	x8, [x19]
	add	x8, x8, w0, sxtw
	str	x8, [x19]
	ldr	x8, [x23]
	str	x8, [x20, #8]
	cbz	x22, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	bl	_h2o_iovec_init
	stp	x0, x1, [x20, #16]
	ldr	x8, [x19]
	add	x8, x8, w21, sxtw
	str	x8, [x19]
	mov	w8, #2
	b	LBB0_3
LBB0_2:
	mov	w8, #1
LBB0_3:
	add	x21, x8, #1
	add	x20, x20, x8, lsl #4
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #2
	bl	_h2o_iovec_init
	stp	x0, x1, [x20]
	ldr	x8, [x19]
	add	x8, x8, #2
	str	x8, [x19]
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%zx\r\n"

l_.str.1:                               ; @.str.1
	.asciz	"\r\n"

.subsections_via_symbols
