	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stream_emit_pending_data
_stream_emit_pending_data:              ## @stream_emit_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	%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
	movq	%rdi, %rbx
	callq	_calc_max_payload_size
	movq	8(%rbx), %rcx
	movq	(%rcx), %rsi
	movq	%rax, %rdi
	callq	_sz_min
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	leaq	8(%rbx), %r15
	movq	16(%rbx), %rdi
	addq	$8, %rdi
	movq	_H2O_HTTP2_FRAME_HEADER_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	addl	%r14d, %esi
	callq	_h2o_buffer_reserve
	movq	%rax, %r12
	cmpq	$0, 40(%rbx)
	je	LBB0_4
## %bb.2:
	cmpq	$0, 32(%rbx)
	je	LBB0_3
LBB0_4:
	movq	(%r15), %rax
	movq	(%rax), %rsi
	xorl	%ecx, %ecx
	cmpq	%rsi, %r14
	jne	LBB0_6
## %bb.5:
	movq	_H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_6
LBB0_3:
	movq	(%r15), %rax
	movq	(%rax), %rsi
	xorl	%ecx, %ecx
LBB0_6:
	movq	_H2O_HTTP2_FRAME_TYPE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	24(%rbx), %r8d
	movq	%r12, %rdi
	callq	_h2o_http2_encode_frame_header
	movslq	(%r13), %rax
	addq	%rax, %r12
	movq	8(%rbx), %rax
	movl	8(%rax), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_h2o_memcpy
	movq	16(%rbx), %rax
	movq	8(%rax), %rax
	movl	(%r13), %ecx
	addl	%r14d, %ecx
	addl	%ecx, (%rax)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_h2o_buffer_consume
	movq	16(%rbx), %rdi
	movq	%r14, %rsi
	callq	_h2o_http2_window_consume_window
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_h2o_http2_window_consume_window
LBB0_7:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H2O_HTTP2_FRAME_HEADER_SIZE,4,2 ## @H2O_HTTP2_FRAME_HEADER_SIZE
	.comm	_H2O_HTTP2_FRAME_TYPE_DATA,4,2  ## @H2O_HTTP2_FRAME_TYPE_DATA
	.comm	_H2O_HTTP2_FRAME_FLAG_END_STREAM,4,2 ## @H2O_HTTP2_FRAME_FLAG_END_STREAM
	.no_dead_strip	_stream_emit_pending_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stream_emit_pending_data
_stream_emit_pending_data:              ; @stream_emit_pending_data
	.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	x19, x0
	bl	_calc_max_payload_size
	mov	x21, x19
	ldr	x8, [x21, #8]!
	ldr	x1, [x8]
	bl	_sz_min
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x19, #16]
	add	x0, x8, #8
Lloh0:
	adrp	x23, _H2O_HTTP2_FRAME_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _H2O_HTTP2_FRAME_HEADER_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w1, w8, w20
	bl	_h2o_buffer_reserve
	mov	x22, x0
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
LBB0_3:
	ldr	x8, [x21]
	ldr	x1, [x8]
Lloh2:
	adrp	x8, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _H2O_HTTP2_FRAME_FLAG_END_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	x20, x1
	csel	w3, w8, wzr, eq
	b	LBB0_5
LBB0_4:
	mov	w3, #0
	ldr	x8, [x21]
	ldr	x1, [x8]
LBB0_5:
Lloh5:
	adrp	x8, _H2O_HTTP2_FRAME_TYPE_DATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _H2O_HTTP2_FRAME_TYPE_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	ldr	w4, [x19, #24]
	mov	x0, x22
	bl	_h2o_http2_encode_frame_header
	ldrsw	x8, [x23]
	add	x0, x22, x8
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	mov	x2, x20
	bl	_h2o_memcpy
	ldr	w8, [x23]
	ldr	x9, [x19, #16]
	ldr	x9, [x9, #8]
	ldr	w10, [x9]
	add	w8, w8, w20
	add	w8, w8, w10
	str	w8, [x9]
	mov	x0, x21
	mov	x1, x20
	bl	_h2o_buffer_consume
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_h2o_http2_window_consume_window
	mov	x0, x19
	mov	x1, x20
	bl	_h2o_http2_window_consume_window
LBB0_6:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_H2O_HTTP2_FRAME_HEADER_SIZE,4,2 ; @H2O_HTTP2_FRAME_HEADER_SIZE
	.comm	_H2O_HTTP2_FRAME_TYPE_DATA,4,2  ; @H2O_HTTP2_FRAME_TYPE_DATA
	.comm	_H2O_HTTP2_FRAME_FLAG_END_STREAM,4,2 ; @H2O_HTTP2_FRAME_FLAG_END_STREAM
	.no_dead_strip	_stream_emit_pending_data
.subsections_via_symbols
