	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_stream_or_open_if_new
_get_stream_or_open_if_new:             ## @get_stream_or_open_if_new
	.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	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_quicly_get_stream
	movq	%rax, (%r15)
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movl	%r14d, %edi
	callq	_quicly_stream_is_client_initiated
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_quicly_is_client
	cmpq	%rax, %r13
	je	LBB0_8
## %bb.2:
	leal	3(%r14), %ebx
	testl	%r14d, %r14d
	cmovnsl	%r14d, %ebx
	sarl	$2, %ebx
	movl	%r14d, %edi
	callq	_quicly_stream_is_unidirectional
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_quicly_get_ingress_max_streams
	cmpl	%eax, %ebx
	jge	LBB0_6
## %bb.3:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_get_streamgroup_state
	cmpl	%r14d, (%rax)
	movl	$0, %ebx
	jg	LBB0_8
## %bb.4:
	movq	%rax, %r13
	movl	%r14d, %edi
	callq	_quicly_stream_is_unidirectional
	movq	(%r12), %rcx
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	addq	$8, %rcx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_6:
	movq	_QUICLY_TRANSPORT_ERROR_STREAM_LIMIT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	addq	$12, %rcx
	movl	8(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_10:
	movl	(%rcx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%r13), %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_open_stream
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r12), %rcx
	movq	(%rcx), %rdi
	movq	%rax, %rsi
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	incl	4(%r13)
	movl	(%r13), %esi
	addl	$4, %esi
	movl	%esi, (%r13)
	movq	(%r15), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_11
	jmp	LBB0_8
LBB0_14:
	movq	_PTLS_ERROR_NO_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_15:
	movq	$0, (%r15)
	movl	%eax, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_QUICLY_TRANSPORT_ERROR_STREAM_LIMIT,4,2 ## @QUICLY_TRANSPORT_ERROR_STREAM_LIMIT
	.comm	_PTLS_ERROR_NO_MEMORY,4,2       ## @PTLS_ERROR_NO_MEMORY
	.no_dead_strip	_get_stream_or_open_if_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function get_stream_or_open_if_new
lCPI0_0:
	.long	4                               ; 0x4
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_get_stream_or_open_if_new:             ; @get_stream_or_open_if_new
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_quicly_get_stream
	str	x0, [x19]
	cbnz	x0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_quicly_stream_is_client_initiated
	mov	x22, x0
	mov	x0, x21
	bl	_quicly_is_client
	cmp	x22, x0
	b.eq	LBB0_4
; %bb.2:
	add	w8, w20, #3
	cmp	w20, #0
	csel	w22, w8, w20, lt
	mov	x0, x20
	bl	_quicly_stream_is_unidirectional
	mov	x1, x0
	mov	x0, x21
	bl	_quicly_get_ingress_max_streams
	cmp	w0, w22, asr #2
	b.le	LBB0_6
; %bb.3:
	mov	x0, x21
	mov	x1, x20
	bl	_get_streamgroup_state
	ldr	w8, [x0]
	cmp	w8, w20
	b.le	LBB0_8
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh0:
	adrp	x8, _QUICLY_TRANSPORT_ERROR_STREAM_LIMIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QUICLY_TRANSPORT_ERROR_STREAM_LIMIT@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_8:
	mov	x22, x0
	mov	x0, x20
	bl	_quicly_stream_is_unidirectional
	ldr	x8, [x21]
	cbz	x0, LBB0_10
; %bb.9:
	mov	w23, #0
	add	x8, x8, #8
	b	LBB0_11
LBB0_10:
	add	x8, x8, #12
	ldr	w23, [x21, #8]
LBB0_11:
	ldr	w24, [x8]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x2, x24
	mov	x3, x23
	bl	_open_stream
	str	x0, [x19]
	cbz	x0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x1, x0
	ldr	x8, [x21]
	ldr	x0, [x8]
	ldr	x8, [x0]
	blr	x8
	cbnz	w0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	d0, [x22]
	add.2s	v0, v0, v8
	str	d0, [x22]
	ldr	x8, [x19]
	ldr	w8, [x8]
	fmov	w1, s0
	cmp	w8, w20
	b.ne	LBB0_12
	b	LBB0_5
LBB0_15:
Lloh4:
	adrp	x8, _PTLS_ERROR_NO_MEMORY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PTLS_ERROR_NO_MEMORY@GOTPAGEOFF]
	b	LBB0_7
LBB0_16:
	str	xzr, [x19]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_QUICLY_TRANSPORT_ERROR_STREAM_LIMIT,4,2 ; @QUICLY_TRANSPORT_ERROR_STREAM_LIMIT
	.comm	_PTLS_ERROR_NO_MEMORY,4,2       ; @PTLS_ERROR_NO_MEMORY
	.no_dead_strip	_get_stream_or_open_if_new
.subsections_via_symbols
