	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wfc_stream_destroy_if_ready
_wfc_stream_destroy_if_ready:           ## @wfc_stream_destroy_if_ready
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_vcos_process_id_current
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	(%rbx), %r8
	movq	24(%rbx), %r9
	testq	%r8, %r8
	jg	LBB0_5
## %bb.2:
	testq	%r9, %r9
	jne	LBB0_5
## %bb.3:
	cmpq	$0, 8(%rbx)
	jle	LBB0_6
## %bb.4:
	xorl	%r9d, %r9d
LBB0_5:
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rbx), %edx
	movq	8(%rbx), %rcx
	leaq	L_.str.1(%rip), %rdi
	callq	_vcos_log_trace
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STREAM_UNLOCK                  ## TAILCALL
LBB0_7:
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vcos_log_error                 ## TAILCALL
LBB0_6:
	movl	%eax, %r14d
	movl	20(%rbx), %r15d
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %edx
	callq	_vcos_log_info
	movl	$1, 16(%rbx)
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_wfc_server_stream_destroy
	movq	%rbx, %rdi
	callq	_STREAM_UNLOCK
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wfc_stream_destroy_stream_ptr  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: stream_ptr is NULL"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
L_.str.1:                               ## @.str.1
	.asciz	"%s: stream: %X not ready: reg:%u srcs:%u o/s:%d"

L_.str.2:                               ## @.str.2
	.asciz	"%s: stream: %X to be destroyed"

	.no_dead_strip	_wfc_stream_destroy_if_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wfc_stream_destroy_if_ready
_wfc_stream_destroy_if_ready:           ; @wfc_stream_destroy_if_ready
	.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, x0
	bl	_vcos_process_id_current
	cbz	x19, LBB0_5
; %bb.1:
	ldr	x4, [x19]
	ldr	x5, [x19, #24]
	cmp	x4, #0
	ccmp	x5, #0, #0, le
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x5, #0
LBB0_4:
Lloh0:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19, #20]
	ldr	x3, [x19, #8]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_trace
	mov	x0, x19
	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
	b	_STREAM_UNLOCK
LBB0_5:
Lloh5:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_vcos_log_error
LBB0_6:
	mov	x20, x0
	ldr	w21, [x19, #20]
Lloh10:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_vcos_log_info
	mov	w8, #1
	str	w8, [x19, #16]
	mov	x0, x21
	mov	x1, x20
	bl	_wfc_server_stream_destroy
	mov	x0, x19
	bl	_STREAM_UNLOCK
	mov	x0, x21
	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
	b	_wfc_stream_destroy_stream_ptr
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: stream_ptr is NULL"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
l_.str.1:                               ; @.str.1
	.asciz	"%s: stream: %X not ready: reg:%u srcs:%u o/s:%d"

l_.str.2:                               ; @.str.2
	.asciz	"%s: stream: %X to be destroyed"

	.no_dead_strip	_wfc_stream_destroy_if_ready
.subsections_via_symbols
