	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wfc_stream_create              ## -- Begin function wfc_stream_create
	.p2align	4, 0x90
_wfc_stream_create:                     ## @wfc_stream_create
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_vcos_log_info
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_wfc_stream_create_stream_ptr
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_vcos_process_id_current
	movslq	%eax, %r12
	movq	_WFC_STREAM_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	$16, -64(%rbp)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)
	movq	_WFC_INVALID_HANDLE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdx
	callq	_wfc_server_stream_create_info
	movq	%rax, (%rbx)
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rdx
	callq	_vcos_log_trace
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_WFC_STREAM_RETRY_DELAY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vcos_sleep
	movq	(%rbx), %rax
	movq	(%r14), %rcx
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%r13), %edx
	testl	%r13d, %r13d
	movl	%edx, %r13d
	jg	LBB0_3
LBB0_7:
	cmpq	%rcx, %rax
	jne	LBB0_9
## %bb.8:
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rdx
	callq	_vcos_log_error
	movq	_VCOS_EEXIST@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_wfc_stream_destroy_if_ready
	jmp	LBB0_10
LBB0_1:
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rdx
	callq	_vcos_log_error
	movq	_VCOS_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_10
LBB0_9:
	xorl	%edi, %edi
	cmpq	%r15, %rax
	sete	%dil
	callq	_vcos_assert
	incl	16(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_STREAM_UNLOCK
	xorl	%r14d, %r14d
LBB0_10:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: stream 0x%x flags 0x%x"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
L_.str.1:                               ## @.str.1
	.asciz	"%s: unable to create data block for stream 0x%x"

	.comm	_VCOS_ENOMEM,8,3                ## @VCOS_ENOMEM
	.comm	_WFC_STREAM_RETRIES,4,2         ## @WFC_STREAM_RETRIES
L_.str.2:                               ## @.str.2
	.asciz	"%s: server create returned 0x%x"

	.comm	_WFC_INVALID_HANDLE,8,3         ## @WFC_INVALID_HANDLE
	.comm	_WFC_STREAM_RETRY_DELAY_MS,4,2  ## @WFC_STREAM_RETRY_DELAY_MS
L_.str.3:                               ## @.str.3
	.asciz	"%s: stream 0x%x already exists in server"

	.comm	_VCOS_EEXIST,8,3                ## @VCOS_EEXIST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wfc_stream_create              ; -- Begin function wfc_stream_create
	.p2align	2
_wfc_stream_create:                     ; @wfc_stream_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VCOS_FUNCTION@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_vcos_log_info
	mov	x0, x19
	mov	w1, #0
	bl	_wfc_stream_create_stream_ptr
	cbz	x0, LBB0_7
; %bb.1:
	mov	x21, x0
	bl	_vcos_process_id_current
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
Lloh4:
	adrp	x8, _WFC_STREAM_RETRIES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WFC_STREAM_RETRIES@GOTPAGEOFF]
Lloh6:
	ldr	w25, [x8]
	mov	w23, #16
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w23, [sp]
	str	x20, [sp, #8]
Lloh7:
	adrp	x23, l_.str.2@PAGE
Lloh8:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh9:
	adrp	x26, _WFC_INVALID_HANDLE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _WFC_INVALID_HANDLE@GOTPAGEOFF]
Lloh11:
	adrp	x27, _WFC_STREAM_RETRY_DELAY_MS@GOTPAGE
Lloh12:
	ldr	x27, [x27, _WFC_STREAM_RETRY_DELAY_MS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x8, x9
	ccmp	w25, #0, #4, eq
	sub	w25, w25, #1
	b.le	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, sp
	mov	x0, x19
	mov	x2, x22
	bl	_wfc_server_stream_create_info
	mov	x2, x0
	str	x0, [x21]
	ldr	w1, [x24]
	mov	x0, x23
	bl	_vcos_log_trace
	ldr	x8, [x21]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x27]
	bl	_vcos_sleep
	ldr	x8, [x21]
	ldr	x9, [x26]
	b	LBB0_2
LBB0_5:
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldr	w1, [x24]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_vcos_log_error
Lloh15:
	adrp	x8, _VCOS_EEXIST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VCOS_EEXIST@GOTPAGEOFF]
Lloh17:
	ldr	x19, [x8]
	mov	x0, x21
	bl	_wfc_stream_destroy_if_ready
	b	LBB0_9
LBB0_7:
	ldr	w1, [x24]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_vcos_log_error
Lloh20:
	adrp	x8, _VCOS_ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VCOS_ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	x19, [x8]
	b	LBB0_9
LBB0_8:
	cmp	x8, x19
	cset	w0, eq
	bl	_vcos_assert
	ldr	w8, [x21, #16]
	add	w8, w8, #1
	str	w8, [x21, #16]
	str	x20, [x21, #8]
	mov	x0, x21
	bl	_STREAM_UNLOCK
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: stream 0x%x flags 0x%x"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
l_.str.1:                               ; @.str.1
	.asciz	"%s: unable to create data block for stream 0x%x"

	.comm	_VCOS_ENOMEM,8,3                ; @VCOS_ENOMEM
	.comm	_WFC_STREAM_RETRIES,4,2         ; @WFC_STREAM_RETRIES
l_.str.2:                               ; @.str.2
	.asciz	"%s: server create returned 0x%x"

	.comm	_WFC_INVALID_HANDLE,8,3         ; @WFC_INVALID_HANDLE
	.comm	_WFC_STREAM_RETRY_DELAY_MS,4,2  ; @WFC_STREAM_RETRY_DELAY_MS
l_.str.3:                               ; @.str.3
	.asciz	"%s: stream 0x%x already exists in server"

	.comm	_VCOS_EEXIST,8,3                ; @VCOS_EEXIST
.subsections_via_symbols
