	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_vc_component_destroy
_mmal_vc_component_destroy:             ## @mmal_vc_component_destroy
	.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, %rbx
	movq	$8, -32(%rbp)
	xorl	%edi, %edi
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
LBB0_3:
	callq	_vcos_assert
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	4(%rax), %eax
	movl	%eax, -44(%rbp)
	xorl	%eax, %eax
	callq	_mmal_vc_get_client
	movq	_MMAL_WORKER_COMPONENT_DESTROY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rsp)
	leaq	-48(%rbp), %rsi
	leaq	-40(%rbp), %r8
	leaq	-32(%rbp), %r9
	movl	%eax, %edi
	movl	$8, %edx
	callq	_mmal_vc_sendwait_message
	movq	%rax, %r14
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpq	%rax, %r14
	jne	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	cmpq	$8, -32(%rbp)
	sete	%dil
	callq	_vcos_assert
	movq	-40(%rbp), %r14
	movq	(%r15), %rax
LBB0_5:
	cmpq	%rax, %r14
	jne	LBB0_6
## %bb.7:
	movq	40(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	movl	48(%rbx), %edi
	callq	_mmal_ports_free
LBB0_9:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	movl	32(%rbx), %edi
	callq	_mmal_ports_free
LBB0_11:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movl	16(%rbx), %edi
	callq	_mmal_ports_free
LBB0_13:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_mmal_queue_destroy
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_vcos_free
	movq	(%rbx), %rax
	movq	$0, (%rax)
	jmp	LBB0_14
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_LOG_ERROR
LBB0_14:
	xorl	%eax, %eax
	callq	_mmal_vc_release
	xorl	%eax, %eax
	callq	_mmal_vc_deinit
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_WORKER_COMPONENT_DESTROY,4,2 ## @MMAL_WORKER_COMPONENT_DESTROY
	.comm	_MMAL_FALSE,4,2                 ## @MMAL_FALSE
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to destroy component - reason %d"

	.no_dead_strip	_mmal_vc_component_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_vc_component_destroy
_mmal_vc_component_destroy:             ; @mmal_vc_component_destroy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	mov	w8, #8
	str	x8, [sp, #8]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, ne
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	bl	_vcos_assert
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w8, [x8, #4]
	str	w8, [sp, #28]
	bl	_mmal_vc_get_client
Lloh0:
	adrp	x8, _MMAL_WORKER_COMPONENT_DESTROY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_WORKER_COMPONENT_DESTROY@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _MMAL_FALSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMAL_FALSE@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	add	x1, sp, #24
	add	x4, sp, #16
	add	x5, sp, #8
	mov	w2, #8
	bl	_mmal_vc_sendwait_message
Lloh6:
	adrp	x21, _MMAL_SUCCESS@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [sp, #8]
	cmp	x8, #8
	cset	w0, eq
	bl	_vcos_assert
	ldr	x20, [sp, #16]
	ldr	x8, [x21]
	cmp	x20, x8
	b.eq	LBB0_8
LBB0_6:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_LOG_ERROR
	b	LBB0_15
LBB0_7:
	mov	x20, x0
	cmp	x20, x8
	b.ne	LBB0_6
LBB0_8:
	ldr	x1, [x19, #40]
	cbz	x1, LBB0_10
; %bb.9:
	ldr	w0, [x19, #48]
	bl	_mmal_ports_free
LBB0_10:
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_12
; %bb.11:
	ldr	w0, [x19, #32]
	bl	_mmal_ports_free
LBB0_12:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_14
; %bb.13:
	ldr	w0, [x19, #16]
	bl	_mmal_ports_free
LBB0_14:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_mmal_queue_destroy
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_vcos_free
	ldr	x8, [x19]
	str	xzr, [x8]
LBB0_15:
	bl	_mmal_vc_release
	bl	_mmal_vc_deinit
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_WORKER_COMPONENT_DESTROY,4,2 ; @MMAL_WORKER_COMPONENT_DESTROY
	.comm	_MMAL_FALSE,4,2                 ; @MMAL_FALSE
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to destroy component - reason %d"

	.no_dead_strip	_mmal_vc_component_destroy
.subsections_via_symbols
