	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_reset_stream_frame
_handle_reset_stream_frame:             ## @handle_reset_stream_frame
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rsi), %eax
	leaq	4(%rsi), %rdi
	leaq	-48(%rbp), %rdx
	movl	%eax, %esi
	callq	_quicly_decode_reset_stream_frame
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-40(%rbp), %esi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	callq	_get_stream_or_open_if_new
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.3:
	addq	$8, %rdi
	callq	_quicly_recvstate_transfer_complete
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	-32(%rbp), %rdi
	addq	$8, %rdi
	movl	-44(%rbp), %esi
	leaq	-56(%rbp), %rdx
	callq	_quicly_recvstate_reset
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	-56(%rbp), %eax
	addl	%eax, (%r14)
	movq	-32(%rbp), %r14
	movq	(%r14), %rax
	movq	(%rax), %r15
	movl	-48(%rbp), %edi
	callq	_QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	*%r15
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_6:
	movq	-32(%rbp), %rdi
	callq	_stream_is_destroyable
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	-32(%rbp), %rdi
	xorl	%esi, %esi
	callq	_destroy_stream
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_handle_reset_stream_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_reset_stream_frame
_handle_reset_stream_frame:             ; @handle_reset_stream_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x8, x1
	mov	x19, x0
	ldr	w1, [x8], #4
	add	x2, sp, #16
	mov	x0, x8
	bl	_quicly_decode_reset_stream_frame
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w1, [sp, #24]
	add	x2, sp, #8
	mov	x0, x19
	bl	_get_stream_or_open_if_new
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, #0, #4, eq
	b.eq	LBB0_6
; %bb.2:
	add	x0, x8, #8
	bl	_quicly_recvstate_transfer_complete
	cbz	w0, LBB0_4
LBB0_3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	ldr	x8, [sp, #8]
	add	x0, x8, #8
	ldr	w1, [sp, #20]
	mov	x2, sp
	bl	_quicly_recvstate_reset
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w8, [sp]
	ldr	w9, [x19]
	add	w8, w9, w8
	str	w8, [x19]
	ldr	x19, [sp, #8]
	ldr	x8, [x19]
	ldr	x20, [x8]
	ldr	w0, [sp, #16]
	bl	_QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE
	mov	x1, x0
	mov	x0, x19
	blr	x20
	cbz	w0, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	x0, [sp, #8]
	bl	_stream_is_destroyable
	cbz	x0, LBB0_3
; %bb.8:
	ldr	x0, [sp, #8]
	mov	w1, #0
	bl	_destroy_stream
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_handle_reset_stream_frame
.subsections_via_symbols
