	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_one_body_fragment
_handle_one_body_fragment:              ## @handle_one_body_fragment
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_set_timeout
	movq	48(%rbx), %rdi
	callq	_h2o_socket_read_stop
	movq	32(%rbx), %r13
	movl	40(%rbx), %r12d
	movq	48(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_h2o_iovec_init
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	*%r13
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_entity_read_send_error_502     ## TAILCALL
LBB0_1:
	movq	48(%rbx), %rdi
	movq	%r15, %rsi
	callq	_h2o_buffer_consume
	addq	%r15, 16(%rbx)
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	$0, 24(%rbx)
	movq	$0, 8(%rbx)
	movq	(%rbx), %rax
	movq	_OSTREAM_STATE_DONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cleanup_connection             ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad Gateway"

	.comm	_OSTREAM_STATE_DONE,8,3         ## @OSTREAM_STATE_DONE
	.no_dead_strip	_handle_one_body_fragment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_one_body_fragment
_handle_one_body_fragment:              ; @handle_one_body_fragment
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w1, #0
	mov	x2, #0
	bl	_set_timeout
	ldr	x0, [x19, #48]
	bl	_h2o_socket_read_stop
	ldr	x23, [x19, #32]
	ldr	w22, [x19, #40]
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x21
	bl	_h2o_iovec_init
	mov	x1, x0
	mov	x0, x22
	mov	x2, x20
	blr	x23
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x1
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_entity_read_send_error_502
LBB0_2:
	ldr	x0, [x19, #48]
	mov	x1, x21
	bl	_h2o_buffer_consume
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	str	x8, [x19, #16]
	cbz	w20, LBB0_5
; %bb.3:
	str	xzr, [x19, #24]
	str	xzr, [x19, #8]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _OSTREAM_STATE_DONE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OSTREAM_STATE_DONE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_cleanup_connection
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad Gateway"

	.comm	_OSTREAM_STATE_DONE,8,3         ; @OSTREAM_STATE_DONE
	.no_dead_strip	_handle_one_body_fragment
.subsections_via_symbols
