	.file	"extr_http1client.c_on_body_chunked.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	on_body_chunked, @function
on_body_chunked:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r13, 8[rbp]
	mov	rdi, r13
	call	h2o_timer_unlink@PLT
	test	rbx, rbx
	je	.L2
	cmp	QWORD PTR h2o_socket_error_closed[rip], rbx
	je	.L29
.L3:
	mov	esi, DWORD PTR h2o_httpclient_error_io[rip]
	mov	rdi, rbp
	call	on_error@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L30
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	test	rax, rax
	je	.L5
	mov	rdx, QWORD PTR 64[rbp]
	lea	rdi, 56[rbp]
	mov	r14, QWORD PTR [rdx]
	mov	rdx, rsp
	mov	QWORD PTR [rsp], rax
	mov	rsi, QWORD PTR 8[r14]
	add	rsi, QWORD PTR [r14]
	sub	rsi, rax
	call	phr_decode_chunked@PLT
	cmp	eax, -1
	je	.L6
	test	eax, eax
	je	.L7
	cmp	eax, -2
	je	.L26
	mov	QWORD PTR 40[rbp], 0
.L7:
	mov	rax, QWORD PTR STREAM_STATE_CLOSED[rip]
	mov	rbx, QWORD PTR h2o_httpclient_error_is_eos[rip]
	mov	QWORD PTR 48[rbp], rax
	mov	rax, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR 4[rax]
	call	h2o_gettimeofday@PLT
	mov	QWORD PTR 32[rbp], rax
.L26:
	mov	rax, QWORD PTR [rsp]
	sub	rax, QWORD PTR [r12]
.L9:
	add	QWORD PTR 8[r14], rax
	je	.L10
	mov	DWORD PTR 0[rbp], 1
.L10:
	mov	rsi, rbx
	mov	rdi, r13
	call	[QWORD PTR 24[rbp]]
	mov	rcx, QWORD PTR STREAM_STATE_CLOSED[rip]
	cmp	QWORD PTR 48[rbp], rcx
	je	.L31
	test	rbx, rbx
	jne	.L27
	test	eax, eax
	jne	.L32
	mov	rdi, r13
	call	do_update_window@PLT
.L5:
	mov	rax, QWORD PTR 16[rbp]
	mov	rdx, r13
	mov	edi, DWORD PTR 4[rax]
	mov	esi, DWORD PTR [rax]
	call	h2o_timer_link@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	lea	rdi, 56[rbp]
	call	phr_decode_chunked_is_in_data@PLT
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	je	.L3
	mov	rax, QWORD PTR STREAM_STATE_CLOSED[rip]
	mov	QWORD PTR 40[rbp], 0
	mov	QWORD PTR 48[rbp], rax
	mov	rax, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR 4[rax]
	call	h2o_gettimeofday@PLT
	mov	rdi, r13
	mov	rsi, QWORD PTR h2o_httpclient_error_is_eos[rip]
	mov	QWORD PTR 32[rbp], rax
	call	[QWORD PTR 24[rbp]]
	mov	rdi, rbp
	call	close_response@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR [r12]
	mov	rbx, QWORD PTR h2o_httpclient_error_http1_parse_failed[rip]
	mov	QWORD PTR 40[rbp], 0
	mov	QWORD PTR [rsp], rax
	xor	eax, eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L32:
	mov	QWORD PTR 40[rbp], 0
.L27:
	mov	rdi, rbp
	call	close_client@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, rbp
	call	close_response@PLT
	jmp	.L1
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	on_body_chunked, .-on_body_chunked
	.comm	h2o_socket_error_closed,8,8
	.comm	h2o_httpclient_error_is_eos,8,8
	.comm	h2o_httpclient_error_io,4,4
	.comm	h2o_httpclient_error_http1_parse_failed,8,8
	.comm	STREAM_STATE_CLOSED,8,8
	.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_http1client.c_on_body_chunked.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	on_body_chunked, %function
on_body_chunked:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r1
	ldr	r5, [r0, #4]
	ldr	r3, .L36
	add	r7, r5, #4
	sub	sp, sp, #12
	mov	r6, r0
	mov	r0, r7
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	h2o_timer_unlink
	cmp	r4, #0
	beq	.L2
	ldr	r3, .L36+4
	ldr	r3, [r3]
	cmp	r3, r4
	beq	.L31
.L3:
	ldr	r3, .L36+8
	mov	r0, r5
	ldr	r1, [r3]
	bl	on_error
.L1:
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L5
	ldr	r1, [r5, #32]
	mov	r2, sp
	ldr	r9, [r1]
	str	r3, [sp]
	ldm	r9, {r0, r1}
	add	r1, r1, r0
	sub	r1, r1, r3
	add	r0, r5, #28
	bl	phr_decode_chunked
	cmn	r0, #1
	beq	.L6
	cmp	r0, #0
	beq	.L7
	cmn	r0, #2
	strne	r4, [r5, #20]
	beq	.L33
.L7:
	ldr	r8, .L36+12
	ldr	r2, [r5, #8]
	ldr	r1, [r8]
	ldr	r3, .L36+16
	ldr	r0, [r2, #4]
	str	r1, [r5, #24]
	ldr	r4, [r3]
	bl	h2o_gettimeofday
	ldr	r2, [r6]
	ldr	r3, [sp]
	str	r0, [r5, #16]
	sub	r3, r3, r2
.L9:
	ldr	r2, [r9, #4]
	mov	r1, r4
	add	r3, r3, r2
	cmp	r3, #0
	str	r3, [r9, #4]
	movne	r3, #1
	mov	r0, r7
	strne	r3, [r5]
	ldr	r3, [r5, #12]
	blx	r3
	ldr	r3, [r8]
	ldr	r2, [r5, #24]
	cmp	r2, r3
	beq	.L34
	cmp	r4, #0
	bne	.L29
	cmp	r0, #0
	bne	.L35
	mov	r0, r7
	bl	do_update_window
.L5:
	ldr	r3, [r5, #8]
	mov	r2, r7
	ldr	r1, [r3]
	ldr	r0, [r3, #4]
	bl	h2o_timer_link
	b	.L1
.L31:
	add	r0, r5, #28
	bl	phr_decode_chunked_is_in_data
	cmp	r0, #0
	bne	.L3
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L3
	ldr	r2, .L36+12
	ldr	r3, [r5, #8]
	ldr	r2, [r2]
	str	r0, [r5, #20]
	str	r2, [r5, #24]
	ldr	r0, [r3, #4]
	bl	h2o_gettimeofday
	ldr	r3, .L36+16
	str	r0, [r5, #16]
	ldr	r1, [r3]
	mov	r0, r7
	ldr	r3, [r5, #12]
	blx	r3
	mov	r0, r5
	bl	close_response
	b	.L1
.L33:
	ldr	r2, [r6]
	ldr	r3, [sp]
	ldr	r8, .L36+12
	sub	r3, r3, r2
	b	.L9
.L6:
	ldr	r3, [r6]
	ldr	r2, .L36+20
	str	r3, [sp]
	str	r4, [r5, #20]
	mov	r3, #0
	ldr	r4, [r2]
	ldr	r8, .L36+12
	b	.L9
.L35:
	str	r4, [r5, #20]
.L29:
	mov	r0, r5
	bl	close_client
	b	.L1
.L34:
	mov	r0, r5
	bl	close_response
	b	.L1
.L32:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	.LC0
	.word	h2o_socket_error_closed
	.word	h2o_httpclient_error_io
	.word	STREAM_STATE_CLOSED
	.word	h2o_httpclient_error_is_eos
	.word	h2o_httpclient_error_http1_parse_failed
	.size	on_body_chunked, .-on_body_chunked
	.comm	h2o_socket_error_closed,4,4
	.comm	h2o_httpclient_error_is_eos,4,4
	.comm	h2o_httpclient_error_io,4,4
	.comm	h2o_httpclient_error_http1_parse_failed,4,4
	.comm	STREAM_STATE_CLOSED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
