	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_encode_header
_do_encode_header:                      ## @do_encode_header
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rdx, %rdi
	callq	_h2o_iovec_is_token
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	movl	(%r12), %eax
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	8(%rbx), %r14
	testq	%r14, %r14
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_14
## %bb.4:
	movq	(%rbx), %r13
	negq	%r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	je	LBB0_14
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %r15
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rax
	shlq	$4, %rax
	cmpq	%r12, 8(%r15,%rax)
	jne	LBB0_11
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rdi
	movl	8(%r12), %esi
	movq	%r13, %rax
	shlq	$4, %rax
	movq	8(%r15,%rax), %rax
	movq	(%rax), %rdx
	movslq	8(%rax), %rcx
	callq	_h2o_memis
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%rbx), %eax
	movq	_HEADER_TABLE_OFFSET@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	addl	%r14d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movl	8(%rax), %esi
	movq	%r13, %rax
	shlq	$4, %rax
	movq	(%r15,%rax), %rax
	movq	(%rax), %rdx
	movq	8(%rax), %rcx
	callq	_h2o_memis
	testl	%eax, %eax
	jne	LBB0_34
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	cmpq	16(%rbx), %r13
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_14:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jne	LBB0_15
## %bb.16:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_18
## %bb.17:
	movl	4(%r12), %eax
LBB0_18:
	testl	%eax, %eax
	je	LBB0_22
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	xorl	%r14d, %r14d
	cmpl	$20, %eax
	setl	%cl
	testl	%esi, %esi
	je	LBB0_20
## %bb.24:
	cmpl	$19, %eax
	jg	LBB0_27
## %bb.25:
	movl	$16, (%r15)
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_h2o_hpack_encode_int
	movq	%rax, %r13
	jmp	LBB0_26
LBB0_34:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$128, (%rdi)
	movl	8(%rbx), %eax
	movq	_HEADER_TABLE_OFFSET@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	addl	%eax, %r14d
	movl	%r14d, %esi
	movl	$7, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_h2o_hpack_encode_int           ## TAILCALL
LBB0_15:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	testl	%eax, %eax
	jne	LBB0_19
LBB0_22:
	testl	%esi, %esi
	je	LBB0_23
LBB0_27:
	movl	$64, (%r15)
	movq	%r15, %rdi
	movl	$6, %edx
	callq	_h2o_hpack_encode_int
	movq	%rax, %r13
	jmp	LBB0_28
LBB0_20:
	movb	%cl, %r14b
	jmp	LBB0_21
LBB0_23:
	xorl	%r14d, %r14d
LBB0_21:
	leaq	4(%r15), %rdi
	movl	$64, (%r15)
	movq	(%r12), %rsi
	movl	8(%r12), %edx
	callq	_h2o_hpack_encode_string
	cltq
	leaq	(%r15,%rax,4), %r13
	addq	$4, %r13
	testl	%r14d, %r14d
	je	LBB0_28
LBB0_26:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movl	8(%rax), %edx
	movq	%r13, %rdi
	callq	_encode_as_is
	movl	%eax, %r14d
	jmp	LBB0_33
LBB0_28:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	%r13, %rdi
	callq	_h2o_hpack_encode_string
	movl	8(%r14), %esi
	addl	8(%r12), %esi
	movl	%eax, %r14d
	movq	_HEADER_TABLE_ENTRY_SIZE_OFFSET@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$32, %edx
	callq	_header_table_add
	testq	%rax, %rax
	je	LBB0_33
## %bb.29:
	movq	%rax, %r15
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_31
## %bb.30:
	movq	%r12, 8(%r15)
	jmp	LBB0_32
LBB0_31:
	movl	8(%r12), %esi
	xorl	%edi, %edi
	callq	_alloc_buf
	movq	%rax, 8(%r15)
	movq	(%rax), %rax
	movslq	8(%r12), %rcx
	movb	$0, (%rax,%rcx)
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	movq	(%r12), %rsi
	movslq	8(%r12), %rdx
	callq	_memcpy
LBB0_32:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %esi
	xorl	%edi, %edi
	callq	_alloc_buf
	movq	%rax, (%r15)
	movq	(%rax), %rax
	movslq	8(%rbx), %rcx
	movb	$0, (%rax,%rcx)
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	(%rbx), %rsi
	movslq	8(%rbx), %rdx
	callq	_memcpy
LBB0_33:
	movslq	%r14d, %rax
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEADER_TABLE_OFFSET,8,3        ## @HEADER_TABLE_OFFSET
	.comm	_HEADER_TABLE_ENTRY_SIZE_OFFSET,4,2 ## @HEADER_TABLE_ENTRY_SIZE_OFFSET
	.no_dead_strip	_do_encode_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_encode_header
_do_encode_header:                      ; @do_encode_header
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x4
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x22, x0
	mov	x0, x2
	bl	_h2o_iovec_is_token
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w24, [x20]
	ldr	x8, [x22, #8]
	cbnz	x8, LBB0_3
	b	LBB0_11
LBB0_2:
	mov	w24, #0
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_11
LBB0_3:
	ldr	x27, [x22]
	neg	x26, x8
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	lsl	x8, x27, #4
	ldr	x8, [x28, x8]
	ldp	x2, x3, [x8]
	bl	_h2o_memis
	cbnz	w0, LBB0_20
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x27, #1
	ldr	x9, [x22, #16]
	cmp	x8, x9
	csinc	x27, xzr, x27, eq
	adds	x26, x26, #1
	b.hs	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x22, #24]
	cbz	w21, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x28, x27, lsl #4
	ldr	x8, [x8, #8]
	cmp	x8, x20
	b.ne	LBB0_5
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x20]
	ldr	w1, [x20, #8]
	add	x8, x28, x27, lsl #4
	ldr	x8, [x8, #8]
	ldr	x2, [x8]
	ldrsw	x3, [x8, #8]
	bl	_h2o_memis
	cbz	w0, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w24, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22, #8]
Lloh0:
	adrp	x9, _HEADER_TABLE_OFFSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HEADER_TABLE_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w8, w8, w9
	add	w24, w26, w8
	b	LBB0_4
LBB0_11:
	cbnz	w25, LBB0_14
; %bb.12:
	cbz	w21, LBB0_14
; %bb.13:
	ldr	w25, [x20, #4]
LBB0_14:
	cbz	w25, LBB0_18
; %bb.15:
	ldr	w8, [x19, #8]
	cmp	w8, #20
	cset	w25, lt
	cbz	w24, LBB0_22
; %bb.16:
	cmp	w8, #19
	b.gt	LBB0_19
; %bb.17:
	mov	w8, #16
	str	w8, [x23]
	mov	x0, x23
	mov	x1, x24
	mov	w2, #4
	bl	_h2o_hpack_encode_int
	mov	x23, x0
	b	LBB0_23
LBB0_18:
	cbz	w24, LBB0_21
LBB0_19:
	mov	w8, #64
	str	w8, [x23]
	mov	x0, x23
	mov	x1, x24
	mov	w2, #6
	bl	_h2o_hpack_encode_int
	mov	x23, x0
	b	LBB0_24
LBB0_20:
	mov	w8, #128
	str	w8, [x23]
	ldr	w8, [x22, #8]
Lloh3:
	adrp	x9, _HEADER_TABLE_OFFSET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HEADER_TABLE_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w8, w8, w9
	add	w1, w8, w26
	mov	x0, x23
	mov	w2, #7
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_h2o_hpack_encode_int
LBB0_21:
	mov	w25, #0
LBB0_22:
	mov	w8, #64
	str	w8, [x23], #4
	ldr	x1, [x20]
	ldr	w2, [x20, #8]
	mov	x0, x23
	bl	_h2o_hpack_encode_string
	add	x23, x23, w0, sxtw #2
	cbz	w25, LBB0_24
LBB0_23:
	ldr	x1, [x19]
	ldr	w2, [x19, #8]
	mov	x0, x23
	bl	_encode_as_is
	mov	x24, x0
	b	LBB0_29
LBB0_24:
	ldr	x1, [x19]
	ldr	w2, [x19, #8]
	mov	x0, x23
	bl	_h2o_hpack_encode_string
	mov	x24, x0
	ldr	w8, [x20, #8]
	ldr	w9, [x19, #8]
Lloh6:
	adrp	x10, _HEADER_TABLE_ENTRY_SIZE_OFFSET@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HEADER_TABLE_ENTRY_SIZE_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	add	w8, w9, w8
	add	w1, w8, w10
	mov	x0, x22
	mov	w2, #32
	bl	_header_table_add
	cbz	x0, LBB0_29
; %bb.25:
	mov	x22, x0
	cbz	w21, LBB0_27
; %bb.26:
	str	x20, [x22, #8]
	b	LBB0_28
LBB0_27:
	ldr	w1, [x20, #8]
	mov	x0, #0
	bl	_alloc_buf
	str	x0, [x22, #8]
	ldr	x8, [x0]
	ldrsw	x9, [x20, #8]
	strb	wzr, [x8, x9]
	ldr	x8, [x22, #8]
	ldr	x0, [x8]
	ldr	x1, [x20]
	ldrsw	x2, [x20, #8]
	bl	_memcpy
LBB0_28:
	ldr	w1, [x19, #8]
	mov	x0, #0
	bl	_alloc_buf
	str	x0, [x22]
	ldr	x8, [x0]
	ldrsw	x9, [x19, #8]
	strb	wzr, [x8, x9]
	ldr	x8, [x22]
	ldr	x0, [x8]
	ldr	x1, [x19]
	ldrsw	x2, [x19, #8]
	bl	_memcpy
LBB0_29:
	add	x0, x23, w24, sxtw #2
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_HEADER_TABLE_OFFSET,8,3        ; @HEADER_TABLE_OFFSET
	.comm	_HEADER_TABLE_ENTRY_SIZE_OFFSET,4,2 ; @HEADER_TABLE_ENTRY_SIZE_OFFSET
	.no_dead_strip	_do_encode_header
.subsections_via_symbols
