	.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	%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
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	-56(%rbp), %rdi
	callq	_h2o_http2_decode_headers_payload
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movslq	(%rbx), %rsi
	testb	$1, %sil
	jne	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rax
LBB0_3:
	movq	%rax, (%r15)
	movq	_H2O_HTTP2_ERROR_PROTOCOL@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	12(%r14), %esi
	jle	LBB0_9
## %bb.7:
	cmpq	%rsi, -48(%rbp)
	jne	LBB0_16
## %bb.8:
	leaq	L_.str.3(%rip), %rax
	jmp	LBB0_3
LBB0_9:
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_h2o_http2_conn_get_stream
	testq	%rax, %rax
	je	LBB0_19
## %bb.10:
	movq	_H2O_HTTP2_STREAM_STATE_RECV_BODY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, (%rax)
	jl	LBB0_2
## %bb.11:
	jle	LBB0_13
## %bb.12:
	cmpl	$0, 40(%rax)
	je	LBB0_2
LBB0_13:
	movl	4(%rbx), %ecx
	movq	_H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_26
## %bb.14:
	movq	_H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_25
## %bb.15:
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r15, %r8
	callq	_handle_trailing_headers
	jmp	LBB0_5
LBB0_16:
	leaq	-48(%rbp), %r13
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_h2o_http2_conn_get_stream
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	movq	%rax, %r12
	movq	_H2O_HTTP2_FRAME_FLAG_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_21
## %bb.18:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	_set_priority
	movq	-48(%rbp), %rax
	movq	%rax, 32(%r12)
	jmp	LBB0_21
LBB0_19:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r15)
	movq	_H2O_HTTP2_ERROR_STREAM_CLOSED@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_20:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	movq	%r13, %rcx
	callq	_h2o_http2_stream_open
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	callq	_set_priority
LBB0_21:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_h2o_http2_stream_prepare_for_request
	movq	_write_req_first@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	16(%r12), %rcx
	movl	%eax, 24(%r12)
	movq	%rcx, 16(%r12)
	movl	4(%rbx), %eax
	movq	_H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_23
## %bb.22:
	leaq	8(%r12), %rdi
	movq	_h2o_socket_buffer_prototype@GOTPCREL(%rip), %rsi
	callq	_h2o_buffer_init
	movl	4(%rbx), %eax
LBB0_23:
	movq	_H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_25
## %bb.24:
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %r8
	callq	_handle_incoming_request
	jmp	LBB0_5
LBB0_25:
	movq	_expect_continuation_of_headers@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_h2o_socket_buffer_prototype@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_h2o_buffer_init
	movl	-56(%rbp), %esi
	movq	%r14, %rdi
	callq	_h2o_buffer_reserve
	movq	(%r14), %rax
	movl	4(%rax), %edi
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %esi
	callq	_memcpy
	movl	-56(%rbp), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_26:
	leaq	L_.str.2(%rip), %rax
	jmp	LBB0_3
	.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	"closed stream id in HEADERS frame"

	.comm	_H2O_HTTP2_ERROR_STREAM_CLOSED,4,2 ## @H2O_HTTP2_ERROR_STREAM_CLOSED
	.comm	_H2O_HTTP2_STREAM_STATE_RECV_BODY,8,3 ## @H2O_HTTP2_STREAM_STATE_RECV_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
L_.str.3:                               ## @.str.3
	.asciz	"stream cannot depend on itself"

	.comm	_H2O_HTTP2_FRAME_FLAG_PRIORITY,4,2 ## @H2O_HTTP2_FRAME_FLAG_PRIORITY
	.comm	_write_req_first,4,2            ## @write_req_first
	.comm	_h2o_socket_buffer_prototype,4,2 ## @h2o_socket_buffer_prototype
	.comm	_expect_continuation_of_headers,4,2 ## @expect_continuation_of_headers
	.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, #80
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, sp
	bl	_h2o_http2_decode_headers_payload
	cbnz	w0, LBB0_5
; %bb.1:
	ldrsw	x1, [x21]
	tbnz	w1, #0, LBB0_6
LBB0_2:
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
LBB0_3:
	str	x8, [x20]
Lloh2:
	adrp	x8, _H2O_HTTP2_ERROR_PROTOCOL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _H2O_HTTP2_ERROR_PROTOCOL@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
LBB0_5:
	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
	add	sp, sp, #80
	ret
LBB0_6:
	ldr	w8, [x19, #12]
	cmp	w1, w8
	b.le	LBB0_9
; %bb.7:
	ldr	x8, [sp, #8]
	cmp	x8, x1
	b.ne	LBB0_16
; %bb.8:
Lloh4:
	adrp	x8, l_.str.3@PAGE
Lloh5:
	add	x8, x8, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_9:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_h2o_http2_conn_get_stream
	cbz	x0, LBB0_19
; %bb.10:
	mov	x1, x0
	ldr	x8, [x0]
Lloh6:
	adrp	x9, _H2O_HTTP2_STREAM_STATE_RECV_BODY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _H2O_HTTP2_STREAM_STATE_RECV_BODY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.11:
	b.le	LBB0_13
; %bb.12:
	ldr	w8, [x1, #40]
	cbz	w8, LBB0_2
LBB0_13:
	ldr	w8, [x21, #4]
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_26
; %bb.14:
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_25
; %bb.15:
	ldp	w3, w2, [sp]
	mov	x0, x19
	mov	x4, x20
	bl	_handle_trailing_headers
	b	LBB0_5
LBB0_16:
	mov	x8, sp
	add	x23, x8, #8
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_h2o_http2_conn_get_stream
	cbz	x0, LBB0_20
; %bb.17:
	mov	x22, x0
	ldr	w8, [x21, #4]
Lloh15:
	adrp	x9, _H2O_HTTP2_FRAME_FLAG_PRIORITY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _H2O_HTTP2_FRAME_FLAG_PRIORITY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.18:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	w3, #1
	bl	_set_priority
	ldr	x8, [sp, #8]
	str	x8, [x22, #32]
	b	LBB0_21
LBB0_19:
Lloh18:
	adrp	x8, l_.str.1@PAGE
Lloh19:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x20]
Lloh20:
	adrp	x8, _H2O_HTTP2_ERROR_STREAM_CLOSED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _H2O_HTTP2_ERROR_STREAM_CLOSED@GOTPAGEOFF]
	b	LBB0_4
LBB0_20:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, #0
	mov	x3, x23
	bl	_h2o_http2_stream_open
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	w3, #0
	bl	_set_priority
LBB0_21:
	mov	x0, x19
	mov	x1, x22
	bl	_h2o_http2_stream_prepare_for_request
Lloh22:
	adrp	x8, _write_req_first@GOTPAGE
Lloh23:
	ldr	x8, [x8, _write_req_first@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	add	x9, x22, #16
	str	w8, [x22, #24]
	str	x9, [x22, #16]
	ldr	w8, [x21, #4]
Lloh25:
	adrp	x9, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGE
Lloh26:
	ldr	x9, [x9, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_23
; %bb.22:
	add	x0, x22, #8
Lloh28:
	adrp	x1, _h2o_socket_buffer_prototype@GOTPAGE
Lloh29:
	ldr	x1, [x1, _h2o_socket_buffer_prototype@GOTPAGEOFF]
	bl	_h2o_buffer_init
	ldr	w8, [x21, #4]
LBB0_23:
Lloh30:
	adrp	x9, _H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPAGE
Lloh31:
	ldr	x9, [x9, _H2O_HTTP2_FRAME_FLAG_END_HEADERS@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_25
; %bb.24:
	ldp	w3, w2, [sp]
	mov	x0, x19
	mov	x1, x22
	mov	x4, x20
	bl	_handle_incoming_request
	b	LBB0_5
LBB0_25:
Lloh33:
	adrp	x8, _expect_continuation_of_headers@GOTPAGE
Lloh34:
	ldr	x8, [x8, _expect_continuation_of_headers@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh36:
	adrp	x1, _h2o_socket_buffer_prototype@GOTPAGE
Lloh37:
	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_5
LBB0_26:
Lloh38:
	adrp	x8, l_.str.2@PAGE
Lloh39:
	add	x8, x8, l_.str.2@PAGEOFF
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.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	"closed stream id in HEADERS frame"

	.comm	_H2O_HTTP2_ERROR_STREAM_CLOSED,4,2 ; @H2O_HTTP2_ERROR_STREAM_CLOSED
	.comm	_H2O_HTTP2_STREAM_STATE_RECV_BODY,8,3 ; @H2O_HTTP2_STREAM_STATE_RECV_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
l_.str.3:                               ; @.str.3
	.asciz	"stream cannot depend on itself"

	.comm	_H2O_HTTP2_FRAME_FLAG_PRIORITY,4,2 ; @H2O_HTTP2_FRAME_FLAG_PRIORITY
	.comm	_write_req_first,4,2            ; @write_req_first
	.comm	_h2o_socket_buffer_prototype,4,2 ; @h2o_socket_buffer_prototype
	.comm	_expect_continuation_of_headers,4,2 ; @expect_continuation_of_headers
	.no_dead_strip	_handle_headers_frame
.subsections_via_symbols
