	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_chunked_entity_read
_handle_chunked_entity_read:            ## @handle_chunked_entity_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rdi
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	movq	%r14, -24(%rbp)
	testq	%r14, %r14
	je	LBB0_9
## %bb.1:
	movl	8(%rax), %esi
	leaq	-24(%rbp), %rdx
	callq	_phr_decode_chunked
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.2:
	movq	-24(%rbp), %rsi
	movq	16(%rbx), %rcx
	addq	%rsi, %rcx
	movq	8(%rbx), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rdx), %rcx
	jae	LBB0_3
## %bb.4:
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movl	%eax, %eax
	subq	%rax, %r14
	movl	$1, %edx
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_entity_read_send_error_413
	jmp	LBB0_9
LBB0_5:
	xorl	%edx, %edx
	cmpl	$-2, %eax
	jne	LBB0_6
LBB0_8:
	movq	%rbx, %rdi
	callq	_handle_one_body_fragment
	movq	(%rbx), %rdi
	subq	-24(%rbp), %r14
	movq	%r14, %rsi
	callq	_h2o_buffer_consume
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	callq	_entity_read_send_error_400
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Request Entity Too Large"

L_.str.1:                               ## @.str.1
	.asciz	"request entity is too large"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid Request"

L_.str.3:                               ## @.str.3
	.asciz	"broken chunked-encoding"

	.no_dead_strip	_handle_chunked_entity_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_chunked_entity_read
_handle_chunked_entity_read:            ; @handle_chunked_entity_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0, #24]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x20, [x8]
	str	x20, [sp, #8]
	cbz	x20, LBB0_10
; %bb.1:
	ldr	w1, [x8, #8]
	add	x2, sp, #8
	bl	_phr_decode_chunked
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.2:
	ldr	x1, [sp, #8]
	ldp	x9, x8, [x19, #8]
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x8, x8, x1
	cmp	x8, x9
	b.hs	LBB0_5
; %bb.3:
	tbnz	w0, #31, LBB0_6
; %bb.4:
	sub	x20, x20, w0, uxtw
	mov	w2, #1
	b	LBB0_8
LBB0_5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_entity_read_send_error_413
	b	LBB0_10
LBB0_6:
	cmn	w0, #2
	b.ne	LBB0_9
; %bb.7:
	mov	w2, #0
LBB0_8:
	mov	x0, x19
	bl	_handle_one_body_fragment
	ldr	x0, [x19]
	ldr	x8, [sp, #8]
	sub	x1, x20, x8
	bl	_h2o_buffer_consume
	b	LBB0_10
LBB0_9:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh6:
	adrp	x2, l_.str.3@PAGE
Lloh7:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_entity_read_send_error_400
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Request Entity Too Large"

l_.str.1:                               ; @.str.1
	.asciz	"request entity is too large"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid Request"

l_.str.3:                               ; @.str.3
	.asciz	"broken chunked-encoding"

	.no_dead_strip	_handle_chunked_entity_read
.subsections_via_symbols
