	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_destroy             ## -- Begin function mmal_graph_destroy
	.p2align	4, 0x90
_mmal_graph_destroy:                    ## @mmal_graph_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_LOG_TRACE
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	*%rax
	movl	(%r14), %eax
LBB0_4:
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_mmal_connection_release
	incq	%rbx
	movl	(%r14), %eax
	cmpq	%rax, %rbx
	jb	LBB0_6
LBB0_7:
	cmpl	$0, 4(%r14)
	je	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_mmal_component_release
	incq	%rbx
	movl	4(%r14), %eax
	cmpq	%rax, %rbx
	jb	LBB0_9
LBB0_10:
	leaq	8(%r14), %rdi
	callq	_vcos_semaphore_delete
	movq	%r14, %rdi
	callq	_vcos_free
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p"

	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_destroy             ; -- Begin function mmal_graph_destroy
	.p2align	2
_mmal_graph_destroy:                    ; @mmal_graph_destroy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_LOG_TRACE
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	blr	x8
	ldr	w8, [x19]
LBB0_3:
	cbz	w8, LBB0_6
; %bb.4:
	mov	x20, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w0, [x8, x20, lsl #2]
	bl	_mmal_connection_release
	add	x20, x20, #1
	ldr	w8, [x19]
	cmp	x20, x8
	b.lo	LBB0_5
LBB0_6:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
; %bb.7:
	mov	x20, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_mmal_component_release
	add	x20, x20, #1
	ldr	w8, [x19, #4]
	cmp	x20, x8
	b.lo	LBB0_8
LBB0_9:
	add	x0, x19, #8
	bl	_vcos_semaphore_delete
	mov	x0, x19
	bl	_vcos_free
Lloh2:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p"

	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
.subsections_via_symbols
