	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_http2_stream_send_pending_data ## -- Begin function h2o_http2_stream_send_pending_data
	.p2align	4, 0x90
_h2o_http2_stream_send_pending_data:    ## @h2o_http2_stream_send_pending_data
	.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	%rsi, %rbx
	movq	%rdi, %r15
	leaq	44(%rsi), %rdi
	callq	_h2o_http2_window_get_avail
	testq	%rax, %rax
	jle	LBB0_10
## %bb.1:
	movq	(%rbx), %r14
	movq	32(%rbx), %rdx
	movl	24(%rbx), %ecx
	leaq	40(%rbx), %r8
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %r9
	callq	_send_data
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	32(%rbx), %rdi
	movslq	24(%rbx), %r12
	leaq	(%rdi,%r12,4), %rcx
	cmpq	%rcx, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %rcx
	subq	%rdi, %rcx
	je	LBB0_8
## %bb.7:
	shrq	$2, %rcx
	subl	%ecx, %r12d
	leal	(,%r12,4), %edx
	movq	%rax, %rsi
	callq	_memmove
	movl	%r12d, 24(%rbx)
	jmp	LBB0_8
LBB0_2:
	movl	$0, 24(%rbx)
	movq	_H2O_SEND_STATE_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_5
LBB0_4:
	movl	$0, 24(%rbx)
	movq	8(%rbx), %rax
	movq	_H2O_HTTP2_STREAM_STATE_SEND_BODY_IS_FINAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_5:
	movq	_H2O_HTTP2_STREAM_STATE_END_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_h2o_http2_stream_set_state
LBB0_8:
	movq	_H2O_SEND_STATE_ERROR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_10
## %bb.9:
	movq	$0, 16(%rbx)
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H2O_SEND_STATE_ERROR,8,3       ## @H2O_SEND_STATE_ERROR
	.comm	_H2O_HTTP2_STREAM_STATE_END_STREAM,4,2 ## @H2O_HTTP2_STREAM_STATE_END_STREAM
	.comm	_H2O_HTTP2_STREAM_STATE_SEND_BODY_IS_FINAL,8,3 ## @H2O_HTTP2_STREAM_STATE_SEND_BODY_IS_FINAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_http2_stream_send_pending_data ; -- Begin function h2o_http2_stream_send_pending_data
	.p2align	2
_h2o_http2_stream_send_pending_data:    ; @h2o_http2_stream_send_pending_data
	.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	x19, x1
	mov	x21, x0
	add	x0, x1, #44
	bl	_h2o_http2_window_get_avail
	cmp	x0, #1
	b.lt	LBB0_10
; %bb.1:
	ldr	x20, [x19]
	ldr	x2, [x19, #32]
	add	x4, x19, #40
	ldr	w3, [x19, #24]
	mov	x0, x21
	mov	x1, x19
	mov	x5, x20
	bl	_send_data
Lloh0:
	adrp	x22, _H2O_SEND_STATE_ERROR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _H2O_SEND_STATE_ERROR@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x1, x0
	ldr	x0, [x19, #32]
	ldrsw	x8, [x19, #24]
	add	x9, x0, x8, lsl #2
	cmp	x1, x9
	b.eq	LBB0_6
; %bb.3:
	subs	x9, x1, x0
	b.eq	LBB0_8
; %bb.4:
	lsr	x9, x9, #2
	sub	w21, w8, w9
	lsl	w2, w21, #2
	bl	_memmove
	str	w21, [x19, #24]
	b	LBB0_8
LBB0_5:
	str	wzr, [x19, #24]
	ldr	x8, [x22]
	str	x8, [x19]
	b	LBB0_7
LBB0_6:
	str	wzr, [x19, #24]
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _H2O_HTTP2_STREAM_STATE_SEND_BODY_IS_FINAL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _H2O_HTTP2_STREAM_STATE_SEND_BODY_IS_FINAL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _H2O_HTTP2_STREAM_STATE_END_STREAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _H2O_HTTP2_STREAM_STATE_END_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x19
	bl	_h2o_http2_stream_set_state
LBB0_8:
	ldr	x8, [x22]
	cmp	x20, x8
	b.ne	LBB0_10
; %bb.9:
	str	xzr, [x19, #16]
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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_H2O_SEND_STATE_ERROR,8,3       ; @H2O_SEND_STATE_ERROR
	.comm	_H2O_HTTP2_STREAM_STATE_END_STREAM,4,2 ; @H2O_HTTP2_STREAM_STATE_END_STREAM
	.comm	_H2O_HTTP2_STREAM_STATE_SEND_BODY_IS_FINAL,8,3 ; @H2O_HTTP2_STREAM_STATE_SEND_BODY_IS_FINAL
.subsections_via_symbols
