	.file	"extr_http2client.c_handle_headers_frame.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"invalid stream id in HEADERS frame"
	.align 8
.LC1:
	.string	"stream cannot depend on itself"
	.align 8
.LC2:
	.string	"trailing HEADERS frame MUST have END_STREAM flag set"
	.text
	.p2align 4
	.type	handle_headers_frame, @function
handle_headers_frame:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rdi, rsp
	call	h2o_http2_decode_headers_payload@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	movsx	rsi, DWORD PTR [rbx]
	test	sil, 1
	je	.L12
	cmp	rsi, QWORD PTR 8[rsp]
	je	.L13
	mov	rdi, rbp
	call	get_stream@PLT
	mov	r14, rax
	test	rax, rax
	je	.L14
	lea	rdi, 8[rax]
	call	h2o_timer_unlink@PLT
	mov	rax, QWORD PTR STREAM_STATE_BODY[rip]
	cmp	QWORD PTR [r14], rax
	mov	eax, DWORD PTR 4[rbx]
	je	.L15
	mov	r12d, eax
	and	r12d, DWORD PTR H2O_HTTP2_FRAME_FLAG_END_HEADERS[rip]
	je	.L16
	xor	r9d, r9d
	mov	ecx, DWORD PTR [rsp]
	test	DWORD PTR H2O_HTTP2_FRAME_FLAG_END_STREAM[rip], eax
	mov	r8, r13
	mov	edx, DWORD PTR 4[rsp]
	setne	r9b
	mov	rsi, r14
	mov	rdi, rbp
	call	on_head@PLT
	mov	r12d, eax
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	lea	rax, .LC0[rip]
	mov	r12d, DWORD PTR H2O_HTTP2_ERROR_PROTOCOL[rip]
	mov	QWORD PTR 0[r13], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rax, .LC0[rip]
	mov	r12d, DWORD PTR H2O_HTTP2_ERROR_STREAM_CLOSED[rip]
	mov	QWORD PTR 0[r13], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rax, .LC1[rip]
	mov	r12d, DWORD PTR H2O_HTTP2_ERROR_PROTOCOL[rip]
	mov	QWORD PTR 0[r13], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	test	DWORD PTR H2O_HTTP2_FRAME_FLAG_END_STREAM[rip], eax
	je	.L18
	test	DWORD PTR H2O_HTTP2_FRAME_FLAG_END_HEADERS[rip], eax
	jne	.L1
	mov	rax, QWORD PTR expect_continuation_of_headers[rip]
	mov	QWORD PTR 8[rbp], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rax, .LC2[rip]
	mov	r12d, DWORD PTR H2O_HTTP2_ERROR_PROTOCOL[rip]
	mov	QWORD PTR 0[r13], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR expect_continuation_of_headers[rip]
	lea	rsi, h2o_socket_buffer_prototype[rip]
	mov	rdi, rbp
	mov	QWORD PTR 8[rbp], rax
	call	h2o_buffer_init@PLT
	mov	esi, DWORD PTR [rsp]
	mov	rdi, rbp
	call	h2o_buffer_reserve@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	edx, DWORD PTR [rsp]
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR 4[rax]
	call	memcpy@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	edx, DWORD PTR [rsp]
	mov	DWORD PTR [rax], edx
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	handle_headers_frame, .-handle_headers_frame
	.comm	h2o_socket_buffer_prototype,4,4
	.comm	expect_continuation_of_headers,8,8
	.comm	STREAM_STATE_BODY,8,8
	.comm	H2O_HTTP2_FRAME_FLAG_END_STREAM,4,4
	.comm	H2O_HTTP2_FRAME_FLAG_END_HEADERS,4,4
	.comm	H2O_HTTP2_ERROR_STREAM_CLOSED,4,4
	.comm	H2O_HTTP2_ERROR_PROTOCOL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_http2client.c_handle_headers_frame.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalid stream id in HEADERS frame\000"
	.align	2
.LC1:
	.ascii	"stream cannot depend on itself\000"
	.align	2
.LC2:
	.ascii	"trailing HEADERS frame MUST have END_STREAM flag se"
	.ascii	"t\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_headers_frame, %function
handle_headers_frame:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L19
	sub	sp, sp, #24
	mov	r7, r0
	add	r0, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r6, r1
	mov	r5, r2
	bl	h2o_http2_decode_headers_payload
	subs	r4, r0, #0
	bne	.L1
	ldr	r1, [r6]
	tst	r1, #1
	beq	.L12
	ldr	r3, [sp, #16]
	cmp	r1, r3
	beq	.L13
	mov	r0, r7
	bl	get_stream
	subs	r8, r0, #0
	beq	.L14
	add	r0, r8, #4
	bl	h2o_timer_unlink
	ldr	r3, .L19+4
	ldr	r2, [r8]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L15
	ldr	r2, .L19+8
	ldr	r3, [r6, #4]
	ldr	r0, [r2]
	ands	r4, r3, r0
	beq	.L16
	ldr	r2, .L19+12
	str	r5, [sp]
	ldr	r2, [r2]
	mov	r1, r8
	tst	r3, r2
	movne	r3, #1
	moveq	r3, #0
	mov	r0, r7
	str	r3, [sp, #4]
	ldr	r2, [sp, #12]
	ldr	r3, [sp, #8]
	bl	on_head
	mov	r4, r0
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r2, .L19+16
	ldr	r3, .L19+20
	str	r2, [r5]
	ldr	r4, [r3]
	b	.L1
.L14:
	ldr	r2, .L19+16
	ldr	r3, .L19+24
	str	r2, [r5]
	ldr	r4, [r3]
	b	.L1
.L13:
	ldr	r2, .L19+28
	ldr	r3, .L19+20
	str	r2, [r5]
	ldr	r4, [r3]
	b	.L1
.L15:
	ldr	r2, .L19+12
	ldr	r3, [r6, #4]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L18
	ldr	r2, .L19+8
	ldr	r2, [r2]
	tst	r3, r2
	ldreq	r3, .L19+32
	ldreq	r3, [r3]
	streq	r3, [r7, #4]
	b	.L1
.L18:
	ldr	r2, .L19+36
	ldr	r3, .L19+20
	str	r2, [r5]
	ldr	r4, [r3]
	b	.L1
.L16:
	ldr	r3, .L19+32
	ldr	r1, .L19+40
	ldr	r3, [r3]
	mov	r0, r7
	str	r3, [r7, #4]
	bl	h2o_buffer_init
	ldr	r1, [sp, #8]
	mov	r0, r7
	bl	h2o_buffer_reserve
	ldr	r3, [r7]
	ldr	r2, [sp, #8]
	ldr	r0, [r3, #4]
	ldr	r1, [sp, #12]
	bl	memcpy
	ldr	r3, [r7]
	ldr	r2, [sp, #8]
	str	r2, [r3]
	b	.L1
.L17:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	STREAM_STATE_BODY
	.word	H2O_HTTP2_FRAME_FLAG_END_HEADERS
	.word	H2O_HTTP2_FRAME_FLAG_END_STREAM
	.word	.LC0
	.word	H2O_HTTP2_ERROR_PROTOCOL
	.word	H2O_HTTP2_ERROR_STREAM_CLOSED
	.word	.LC1
	.word	expect_continuation_of_headers
	.word	.LC2
	.word	h2o_socket_buffer_prototype
	.size	handle_headers_frame, .-handle_headers_frame
	.comm	h2o_socket_buffer_prototype,4,4
	.comm	expect_continuation_of_headers,4,4
	.comm	STREAM_STATE_BODY,4,4
	.comm	H2O_HTTP2_FRAME_FLAG_END_STREAM,4,4
	.comm	H2O_HTTP2_FRAME_FLAG_END_HEADERS,4,4
	.comm	H2O_HTTP2_ERROR_STREAM_CLOSED,4,4
	.comm	H2O_HTTP2_ERROR_PROTOCOL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
