	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_headers_frame
_handle_headers_frame:                  ## @handle_headers_frame
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	-48(%rbp), %rdi
	callq	_h2o_http2_decode_headers_payload
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movslq	(%rbx), %rsi
	testb	$1, %sil
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	cmpq	%rsi, -40(%rbp)
	jne	LBB0_8
## %bb.4:
	leaq	L_.str.1(%rip), %rax
LBB0_5:
	movq	%rax, (%r15)
	movq	_H2O_HTTP2_ERROR_PROTOCOL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_get_stream
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %r12
	movq	%rax, %rdi
	addq	$8, %rdi
	callq	_h2o_timer_unlink
	movq	(%r12), %rax
	movq	_STREAM_STATE_BODY@GOTPCREL(%rip), %rdx
	movl	4(%rbx), %ecx
	cmpq	(%rdx), %rax
	jne	LBB0_14
## %bb.10:
	movq	_H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_16
## %bb.11:
	movq	_H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_7
## %bb.12:
	movq	_expect_continuation_of_headers@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%r14)
	jmp	LBB0_7
LBB0_13:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r15)
	movq	_H2O_HTTP2_ERROR_STREAM_CLOSED@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_14:
	movq	_H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_17
## %bb.15:
	movq	_H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPCREL(%rip), %rax
	xorl	%r9d, %r9d
	andl	(%rax), %ecx
	setne	%r9b
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %r8
	callq	_on_head
	jmp	LBB0_7
LBB0_16:
	leaq	L_.str.2(%rip), %rax
	jmp	LBB0_5
LBB0_17:
	movq	_expect_continuation_of_headers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	_h2o_socket_buffer_prototype@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_h2o_buffer_init
	movl	-48(%rbp), %esi
	movq	%r14, %rdi
	callq	_h2o_buffer_reserve
	movq	(%r14), %rax
	movl	4(%rax), %edi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	callq	_memcpy
	movl	-48(%rbp), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid stream id in HEADERS frame"

	.comm	_H2O_HTTP2_ERROR_PROTOCOL,4,2   ## @H2O_HTTP2_ERROR_PROTOCOL
L_.str.1:                               ## @.str.1
	.asciz	"stream cannot depend on itself"

	.comm	_H2O_HTTP2_ERROR_STREAM_CLOSED,4,2 ## @H2O_HTTP2_ERROR_STREAM_CLOSED
	.comm	_STREAM_STATE_BODY,8,3          ## @STREAM_STATE_BODY
	.comm	_H2O_HTTP2_FRAME_FLAG_END_STREAM,4,2 ## @H2O_HTTP2_FRAME_FLAG_END_STREAM
L_.str.2:                               ## @.str.2
	.asciz	"trailing HEADERS frame MUST have END_STREAM flag set"

	.comm	_H2O_HTTP2_FRAME_FLAG_END_HEADERS,4,2 ## @H2O_HTTP2_FRAME_FLAG_END_HEADERS
	.comm	_expect_continuation_of_headers,8,3 ## @expect_continuation_of_headers
	.comm	_h2o_socket_buffer_prototype,4,2 ## @h2o_socket_buffer_prototype
	.no_dead_strip	_handle_headers_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_headers_frame
_handle_headers_frame:                  ; @handle_headers_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, sp
	bl	_h2o_http2_decode_headers_payload
	cbnz	w0, LBB0_7
; %bb.1:
	ldrsw	x1, [x21]
	tbnz	w1, #0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
	ldr	x8, [sp, #8]
	cmp	x8, x1
	b.ne	LBB0_8
; %bb.4:
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
LBB0_5:
	str	x8, [x20]
Lloh4:
	adrp	x8, _H2O_HTTP2_ERROR_PROTOCOL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _H2O_HTTP2_ERROR_PROTOCOL@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	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
	add	sp, sp, #64
	ret
LBB0_8:
	mov	x0, x19
	bl	_get_stream
	cbz	x0, LBB0_13
; %bb.9:
	mov	x22, x0
	add	x0, x0, #8
	bl	_h2o_timer_unlink
	ldr	x9, [x22]
Lloh6:
	adrp	x8, _STREAM_STATE_BODY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STREAM_STATE_BODY@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x8]
	ldr	w8, [x21, #4]
	cmp	x9, x10
	b.ne	LBB0_14
; %bb.10:
Lloh9:
	adrp	x9, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.11:
Lloh12:
	adrp	x9, _H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.12:
	mov	w0, #0
	b	LBB0_7
LBB0_13:
Lloh15:
	adrp	x8, l_.str@PAGE
Lloh16:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x20]
Lloh17:
	adrp	x8, _H2O_HTTP2_ERROR_STREAM_CLOSED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _H2O_HTTP2_ERROR_STREAM_CLOSED@GOTPAGEOFF]
	b	LBB0_6
LBB0_14:
Lloh19:
	adrp	x9, _H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.15:
Lloh22:
	adrp	x9, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGE
Lloh23:
	ldr	x9, [x9, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w5, ne
	ldp	w3, w2, [sp]
	mov	x0, x19
	mov	x1, x22
	mov	x4, x20
	bl	_on_head
	b	LBB0_7
LBB0_16:
Lloh25:
	adrp	x8, l_.str.2@PAGE
Lloh26:
	add	x8, x8, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_17:
Lloh27:
	adrp	x8, _expect_continuation_of_headers@GOTPAGE
Lloh28:
	ldr	x8, [x8, _expect_continuation_of_headers@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	str	x8, [x19, #8]
Lloh30:
	adrp	x1, _h2o_socket_buffer_prototype@GOTPAGE
Lloh31:
	ldr	x1, [x1, _h2o_socket_buffer_prototype@GOTPAGEOFF]
	mov	x0, x19
	bl	_h2o_buffer_init
	ldr	w1, [sp]
	mov	x0, x19
	bl	_h2o_buffer_reserve
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	ldp	w2, w1, [sp]
	bl	_memcpy
	mov	w0, #0
	ldr	w8, [sp]
	ldr	x9, [x19]
	str	w8, [x9]
	b	LBB0_7
LBB0_18:
	mov	w0, #0
Lloh32:
	adrp	x8, _expect_continuation_of_headers@GOTPAGE
Lloh33:
	ldr	x8, [x8, _expect_continuation_of_headers@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid stream id in HEADERS frame"

	.comm	_H2O_HTTP2_ERROR_PROTOCOL,4,2   ; @H2O_HTTP2_ERROR_PROTOCOL
l_.str.1:                               ; @.str.1
	.asciz	"stream cannot depend on itself"

	.comm	_H2O_HTTP2_ERROR_STREAM_CLOSED,4,2 ; @H2O_HTTP2_ERROR_STREAM_CLOSED
	.comm	_STREAM_STATE_BODY,8,3          ; @STREAM_STATE_BODY
	.comm	_H2O_HTTP2_FRAME_FLAG_END_STREAM,4,2 ; @H2O_HTTP2_FRAME_FLAG_END_STREAM
l_.str.2:                               ; @.str.2
	.asciz	"trailing HEADERS frame MUST have END_STREAM flag set"

	.comm	_H2O_HTTP2_FRAME_FLAG_END_HEADERS,4,2 ; @H2O_HTTP2_FRAME_FLAG_END_HEADERS
	.comm	_expect_continuation_of_headers,8,3 ; @expect_continuation_of_headers
	.comm	_h2o_socket_buffer_prototype,4,2 ; @h2o_socket_buffer_prototype
	.no_dead_strip	_handle_headers_frame
.subsections_via_symbols
