	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flatten_string
_flatten_string:                        ## @flatten_string
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%r8d, %r8d
	jne	LBB0_2
## %bb.1:
	movq	(%r13), %rax
	movslq	8(%r13), %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$4, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_h2o_hpack_encode_huffman
	movq	%rax, %r14
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_3
LBB0_2:
	movl	$-2, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	movq	(%r13), %rcx
	movslq	8(%r13), %rdx
	andl	%eax, (%rcx,%rdx,4)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_flatten_int
	movslq	8(%r13), %rdi
	shlq	$2, %rdi
	addq	(%r13), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_memcpy
	addl	%ebx, 8(%r13)
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_H2O_HPACK_ENCODE_INT_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	(%r13), %rax
	movslq	8(%r13), %rdx
	movl	$1, %esi
	movl	%r15d, %ecx
	shll	%cl, %esi
	negl	%esi
	andl	(%rax,%rdx,4), %esi
	btsl	%r15d, %esi
	movl	%esi, (%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_h2o_hpack_encode_int
	subq	%r12, %rax
	movq	%rax, %rbx
	sarq	$2, %rbx
	cmpq	$4, %rax
	jne	LBB0_5
## %bb.4:
	movl	(%r12), %eax
	movq	(%r13), %rcx
	movslq	8(%r13), %rdx
	movl	%eax, (%rcx,%rdx,4)
	jmp	LBB0_6
LBB0_5:
	movq	(%r13), %rax
	movslq	8(%r13), %rcx
	leaq	(%rax,%rcx,4), %rdx
	leaq	(%rdx,%rbx,4), %rdi
	leaq	(%rax,%rcx,4), %rsi
	addq	$4, %rsi
	movq	%r14, %rdx
	callq	_memmove
	movslq	8(%r13), %rdi
	shlq	$2, %rdi
	addq	(%r13), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_memcpy
LBB0_6:
	addl	%r14d, %ebx
	addl	%ebx, 8(%r13)
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.comm	_H2O_HPACK_ENCODE_INT_MAX_LENGTH,4,2 ## @H2O_HPACK_ENCODE_INT_MAX_LENGTH
	.no_dead_strip	_flatten_string
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flatten_string
_flatten_string:                        ; @flatten_string
	.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
	sub	sp, sp, #16
	mov	x21, x3
	mov	x22, x2
	mov	x23, 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, #-56]
	cbnz	w4, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldrsw	x9, [x19, #8]
	add	x8, x8, x9, lsl #2
	add	x0, x8, #4
	mov	x1, x23
	mov	x2, x22
	bl	_h2o_hpack_encode_huffman
Lloh3:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
LBB0_2:
	mov	w8, #-2
	lsl	w8, w8, w21
	ldr	x9, [x19]
	ldrsw	x10, [x19, #8]
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	and	w8, w11, w8
	str	w8, [x9, x10]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_flatten_int
	ldr	x8, [x19]
	ldrsw	x9, [x19, #8]
	add	x0, x8, x9, lsl #2
	stp	x23, x22, [sp, #-16]!
	bl	_memcpy
	add	sp, sp, #16
	ldr	w8, [x19, #8]
	add	w8, w8, w22
	str	w8, [x19, #8]
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.4:
	sub	sp, x29, #48
	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
LBB0_5:
	mov	x20, x0
	mov	x23, sp
Lloh9:
	adrp	x8, _H2O_HPACK_ENCODE_INT_MAX_LENGTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _H2O_HPACK_ENCODE_INT_MAX_LENGTH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh12:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh13:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	x8, [x19]
	ldrsw	x9, [x19, #8]
	ldr	w8, [x8, x9, lsl #2]
	mov	w9, #1
	lsl	w9, w9, w21
	neg	w10, w9
	and	w8, w8, w10
	orr	w8, w8, w9
	str	w8, [x22]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	bl	_h2o_hpack_encode_int
	sub	x8, x0, x22
	asr	x21, x8, #2
	cmp	x8, #4
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x22]
	ldr	x9, [x19]
	ldrsw	x10, [x19, #8]
	str	w8, [x9, x10, lsl #2]
	b	LBB0_8
LBB0_7:
	ldr	x8, [x19]
	ldrsw	x9, [x19, #8]
	add	x8, x8, x9, lsl #2
	add	x0, x8, x21, lsl #2
	add	x1, x8, #4
	mov	x2, x20
	bl	_memmove
	ldr	x8, [x19]
	ldrsw	x9, [x19, #8]
	add	x0, x8, x9, lsl #2
	stp	x22, x21, [sp, #-16]!
	bl	_memcpy
	add	sp, sp, #16
LBB0_8:
	ldr	w8, [x19, #8]
	add	w9, w21, w20
	add	w8, w8, w9
	str	w8, [x19, #8]
	mov	sp, x23
	b	LBB0_3
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.comm	_H2O_HPACK_ENCODE_INT_MAX_LENGTH,4,2 ; @H2O_HPACK_ENCODE_INT_MAX_LENGTH
	.no_dead_strip	_flatten_string
.subsections_via_symbols
