	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wfc_stream_destroy_stream_ptr
_wfc_stream_destroy_stream_ptr:         ## @wfc_stream_destroy_stream_ptr
	.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
	movl	%edi, %ebx
	callq	_wfc_stream_global_lock_and_find_stream_ptr
	movq	%rax, %r14
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_vcos_log_trace
	testq	%r14, %r14
	je	LBB0_13
## %bb.1:
	cmpq	$0, 32(%r14)
	je	LBB0_12
## %bb.2:
	movq	%r14, %rdi
	callq	_STREAM_LOCK
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_trace
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rcx, (%rax)
LBB0_4:
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	%rax, (%rcx)
	movq	_wfc_stream_head@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	callq	_wfc_server_disconnect
LBB0_9:
	xorl	%eax, %eax
	callq	_GLOBAL_UNLOCK
	movq	%r14, %rdi
	callq	_STREAM_UNLOCK
	movq	_WFC_STREAM_FLAGS_REQ_RECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	addq	$4, %rdi
	xorl	%esi, %esi
	callq	_vcos_thread_join
LBB0_11:
	movq	%r14, %rdi
	callq	_vcos_mutex_delete
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vcos_blockpool_free            ## TAILCALL
LBB0_13:
	movl	(%r15), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %edx
	callq	_vcos_log_error
	jmp	LBB0_14
LBB0_12:
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_vcos_log_trace
LBB0_14:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_GLOBAL_UNLOCK                  ## TAILCALL
LBB0_6:
	movq	_wfc_stream_head@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_9
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: stream handle 0x%x"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
L_.str.1:                               ## @.str.1
	.asciz	"%s: unlinking from list"

	.comm	_wfc_stream_head,8,3            ## @wfc_stream_head
L_.str.2:                               ## @.str.2
	.asciz	"%s: stream 0x%x recycled before destruction"

L_.str.3:                               ## @.str.3
	.asciz	"%s: stream 0x%x not found"

	.comm	_WFC_STREAM_FLAGS_REQ_RECT,4,2  ## @WFC_STREAM_FLAGS_REQ_RECT
	.no_dead_strip	_wfc_stream_destroy_stream_ptr
.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_stream_ptr
_wfc_stream_destroy_stream_ptr:         ; @wfc_stream_destroy_stream_ptr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_wfc_stream_global_lock_and_find_stream_ptr
	mov	x19, x0
Lloh0:
	adrp	x21, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VCOS_FUNCTION@GOTPAGEOFF]
	ldr	w1, [x21]
	str	x20, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_trace
	cbz	x19, LBB0_10
; %bb.1:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_11
; %bb.2:
	mov	x0, x19
	bl	_STREAM_LOCK
	ldr	w1, [x21]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_trace
	ldp	x8, x9, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	str	x9, [x8]
LBB0_4:
	cbz	x9, LBB0_13
; %bb.5:
	str	x8, [x9]
Lloh6:
	adrp	x8, _wfc_stream_head@GOTPAGE
Lloh7:
	ldr	x8, [x8, _wfc_stream_head@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbnz	x8, LBB0_7
LBB0_6:
	bl	_wfc_server_disconnect
LBB0_7:
	bl	_GLOBAL_UNLOCK
	mov	x0, x19
	bl	_STREAM_UNLOCK
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x9, _WFC_STREAM_FLAGS_REQ_RECT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WFC_STREAM_FLAGS_REQ_RECT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	add	x0, x19, #4
	mov	x1, #0
	bl	_vcos_thread_join
LBB0_9:
	mov	x0, x19
	bl	_vcos_mutex_delete
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_vcos_blockpool_free
LBB0_10:
	ldr	w1, [x21]
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_vcos_log_error
	b	LBB0_12
LBB0_11:
	ldr	w1, [x21]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_vcos_log_trace
LBB0_12:
	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
	add	sp, sp, #64
	b	_GLOBAL_UNLOCK
LBB0_13:
Lloh16:
	adrp	x9, _wfc_stream_head@GOTPAGE
Lloh17:
	ldr	x9, [x9, _wfc_stream_head@GOTPAGEOFF]
Lloh18:
	str	x8, [x9]
	cbnz	x8, LBB0_7
	b	LBB0_6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: stream handle 0x%x"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
l_.str.1:                               ; @.str.1
	.asciz	"%s: unlinking from list"

	.comm	_wfc_stream_head,8,3            ; @wfc_stream_head
l_.str.2:                               ; @.str.2
	.asciz	"%s: stream 0x%x recycled before destruction"

l_.str.3:                               ; @.str.3
	.asciz	"%s: stream 0x%x not found"

	.comm	_WFC_STREAM_FLAGS_REQ_RECT,4,2  ; @WFC_STREAM_FLAGS_REQ_RECT
	.no_dead_strip	_wfc_stream_destroy_stream_ptr
.subsections_via_symbols
