	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function middleware_wait_chunk_callback
_middleware_wait_chunk_callback:        ## @middleware_wait_chunk_callback
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rdx, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movl	%ecx, %edi
	xorl	%esi, %esi
	callq	_mrb_ary_entry
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_DATA_PTR
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_app_input_stream_type@GOTPCREL(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_mrb_data_check_get_ptr
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	16(%rax), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.10:
	addq	$16, %rbx
	movl	$1, (%r15)
	movl	8(%rax), %esi
	movq	%r12, %rdi
	callq	_h2o_mruby_new_str
	movl	%eax, %r14d
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_h2o_buffer_consume
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_4:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mrb_exc_new_str_lit            ## TAILCALL
LBB0_6:
	movq	(%rbx), %rax
	movq	_FINAL_RECEIVED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movl	$1, (%r15)
	jmp	LBB0_8
LBB0_9:
	movl	8(%rbx), %edi
	callq	_mrb_nil_p
	movl	%eax, %edi
	callq	_assert
	movl	(%r14), %eax
	movl	%eax, 8(%rbx)
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_mrb_gc_register
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mrb_nil_value                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_E_ARGUMENT_ERROR,4,2           ## @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"downstream HTTP closed"

	.comm	_app_input_stream_type,4,2      ## @app_input_stream_type
L_.str.1:                               ## @.str.1
	.asciz	"AppInputStream#each wrong self"

	.comm	_FINAL_RECEIVED,8,3             ## @FINAL_RECEIVED
	.no_dead_strip	_middleware_wait_chunk_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function middleware_wait_chunk_callback
_middleware_wait_chunk_callback:        ; @middleware_wait_chunk_callback
	.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	x21, x4
	mov	x20, x2
	ldr	x8, [x0]
	ldr	x19, [x8]
	mov	x0, x3
	mov	w1, #0
	bl	_mrb_ary_entry
	mov	x22, x0
	bl	_DATA_PTR
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x2, _app_input_stream_type@GOTPAGE
Lloh1:
	ldr	x2, [x2, _app_input_stream_type@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x22
	bl	_mrb_data_check_get_ptr
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
	mov	x23, x0
	ldr	x8, [x23, #16]!
	ldr	x2, [x8]
	cbz	x2, LBB0_7
; %bb.3:
	mov	w9, #1
	str	w9, [x21]
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_h2o_mruby_new_str
	mov	x19, x0
	ldr	x8, [x23]
	ldr	x1, [x8]
	mov	x0, x23
	bl	_h2o_buffer_consume
	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
	ret
LBB0_4:
Lloh2:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_6:
	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	_mrb_exc_new_str_lit
LBB0_7:
	ldr	x8, [x22]
Lloh12:
	adrp	x9, _FINAL_RECEIVED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _FINAL_RECEIVED@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_10
LBB0_9:
	ldr	w0, [x22, #8]
	bl	_mrb_nil_p
	bl	_assert
	ldr	w8, [x20]
	str	w8, [x22, #8]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mrb_gc_register
LBB0_10:
	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	_mrb_nil_value
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_E_ARGUMENT_ERROR,4,2           ; @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"downstream HTTP closed"

	.comm	_app_input_stream_type,4,2      ; @app_input_stream_type
l_.str.1:                               ; @.str.1
	.asciz	"AppInputStream#each wrong self"

	.comm	_FINAL_RECEIVED,8,3             ; @FINAL_RECEIVED
	.no_dead_strip	_middleware_wait_chunk_callback
.subsections_via_symbols
