	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_chunk_method
_send_chunk_method:                     ## @send_chunk_method
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_mrb_get_args
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_h2o_mruby_get_generator
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_check_precond
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_mrb_nil_p
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_mrb_exc_raise
LBB0_2:
	movq	-40(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.3:
	movq	(%r14), %r15
	movq	16(%r15), %rax
	movq	_SIZE_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	cmpq	%rsi, %rax
	jge	LBB0_6
## %bb.5:
	movq	%rax, -40(%rbp)
	movq	%rax, %rsi
	testq	%rax, %rax
	je	LBB0_11
LBB0_6:
	movq	%r15, %rdi
	callq	_h2o_buffer_try_reserve
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_E_RUNTIME_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_mrb_exc_new_str_lit
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mrb_exc_raise
LBB0_8:
	movq	(%r15), %rax
	movq	8(%rax), %rdi
	addq	(%rax), %rdi
	movq	-56(%rbp), %rsi
	movq	-40(%rbp), %rdx
	callq	_memcpy
	movq	-40(%rbp), %rax
	movq	(%r15), %rcx
	addq	%rax, 8(%rcx)
	cmpl	$0, 24(%r15)
	jne	LBB0_11
## %bb.9:
	cmpl	$0, 8(%r15)
	jne	LBB0_11
## %bb.10:
	leaq	8(%r15), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_h2o_mruby_sender_do_send_buffer
LBB0_11:
	xorl	%eax, %eax
	callq	_mrb_nil_value
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"so"

	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.comm	_E_RUNTIME_ERROR,4,2            ## @E_RUNTIME_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate memory"

	.no_dead_strip	_send_chunk_method
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_chunk_method
_send_chunk_method:                     ; @send_chunk_method
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #24
	add	x3, sp, #16
	add	x4, sp, #12
	bl	_mrb_get_args
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_h2o_mruby_get_generator
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_check_precond
	mov	x21, x0
	bl	_mrb_nil_p
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_mrb_exc_raise
LBB0_2:
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_10
; %bb.3:
	ldr	x21, [x19]
	ldr	x8, [x21, #16]
Lloh2:
	adrp	x9, _SIZE_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SIZE_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x8, x1, #0, ne
	b.ge	LBB0_5
; %bb.4:
	str	x8, [sp, #16]
	mov	x1, x8
	cbz	x8, LBB0_10
LBB0_5:
	mov	x0, x21
	bl	_h2o_buffer_try_reserve
	cbnz	x0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _E_RUNTIME_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E_RUNTIME_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_mrb_exc_new_str_lit
	mov	x1, x0
	mov	x0, x20
	bl	_mrb_exc_raise
LBB0_7:
	ldr	x8, [x21]
	ldp	x9, x8, [x8]
	add	x0, x8, x9
	ldp	x2, x1, [sp, #16]
	bl	_memcpy
	ldr	x8, [sp, #16]
	ldr	x9, [x21]
	ldr	x10, [x9, #8]
	add	x8, x10, x8
	str	x8, [x9, #8]
	ldr	w8, [x21, #24]
	cbnz	w8, LBB0_10
; %bb.8:
	mov	x1, x21
	ldr	w8, [x1, #8]!
	cbnz	w8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x2, x21
	mov	w3, #0
	bl	_h2o_mruby_sender_do_send_buffer
LBB0_10:
	bl	_mrb_nil_value
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"so"

	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.comm	_E_RUNTIME_ERROR,4,2            ; @E_RUNTIME_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate memory"

	.no_dead_strip	_send_chunk_method
.subsections_via_symbols
