	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_subreq_entity
_prepare_subreq_entity:                 ## @prepare_subreq_entity
	.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
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	(%rax), %r15
	movl	%edx, %edi
	callq	_mrb_nil_p
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_h2o_iovec_init
	movq	%rax, 8(%r14)
	movq	$0, (%r14)
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_mrb_intern_lit
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mrb_respond_to
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_mrb_funcall
	cmpq	$0, (%r15)
	jne	LBB0_9
## %bb.4:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_mrb_string_p
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	leaq	16(%r14), %r15
	movl	%ebx, %edi
	callq	_RSTRING_PTR
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_RSTRING_LEN
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_h2o_strdup
	movq	%rax, 8(%r14)
	movq	(%r14), %rcx
	movq	_SIZE_MAX@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_6
## %bb.11:
	cmpq	%rax, %rcx
	jle	LBB0_13
LBB0_6:
	movq	%rax, (%r14)
	jmp	LBB0_9
LBB0_7:
	movq	_E_RUNTIME_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_8:
	movq	%r15, %rdi
	callq	_mrb_exc_new_str_lit
	movl	%eax, %edi
	callq	_mrb_obj_ptr
	movq	%rax, (%r15)
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_E_RUNTIME_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_8
LBB0_13:
	jge	LBB0_9
## %bb.14:
	movq	%rcx, 8(%r14)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read"

	.comm	_E_RUNTIME_ERROR,4,2            ## @E_RUNTIME_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"'rack.input' must respond to 'read'"

L_.str.2:                               ## @.str.2
	.asciz	"return value of `read` must be a string"

	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.no_dead_strip	_prepare_subreq_entity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_subreq_entity
_prepare_subreq_entity:                 ; @prepare_subreq_entity
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x19, x0
	ldr	x8, [x1]
	ldr	x20, [x8]
	mov	x0, x2
	bl	_mrb_nil_p
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, #0
	mov	w1, #0
	bl	_h2o_iovec_init
	stp	xzr, x0, [x19]
	b	LBB0_10
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_intern_lit
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_mrb_respond_to
	cbz	w0, LBB0_8
; %bb.3:
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	bl	_mrb_funcall
	ldr	x8, [x20]
	cbnz	x8, LBB0_10
; %bb.4:
	mov	x21, x0
	bl	_mrb_string_p
	cbz	w0, LBB0_11
; %bb.5:
	add	x20, x19, #16
	mov	x0, x21
	bl	_RSTRING_PTR
	mov	x22, x0
	mov	x0, x21
	bl	_RSTRING_LEN
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_h2o_strdup
	str	x0, [x19, #8]
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _SIZE_MAX@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SIZE_MAX@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
	cmp	x8, x0
	b.le	LBB0_12
LBB0_7:
	str	x0, [x19]
	b	LBB0_10
LBB0_8:
Lloh7:
	adrp	x8, _E_RUNTIME_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E_RUNTIME_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x20
	bl	_mrb_exc_new_str_lit
	bl	_mrb_obj_ptr
	str	x0, [x20]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh12:
	adrp	x8, _E_RUNTIME_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _E_RUNTIME_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_12:
	b.ge	LBB0_10
; %bb.13:
	str	x8, [x19, #8]
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read"

	.comm	_E_RUNTIME_ERROR,4,2            ; @E_RUNTIME_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"'rack.input' must respond to 'read'"

l_.str.2:                               ; @.str.2
	.asciz	"return value of `read` must be a string"

	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.no_dead_strip	_prepare_subreq_entity
.subsections_via_symbols
