	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_enable              ## -- Begin function mmal_graph_enable
	.p2align	4, 0x90
_mmal_graph_enable:                     ## @mmal_graph_enable
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r13
	movq	(%r13), %r14
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_LOG_TRACE
	leaq	44(%r12), %rdi
	movq	_graph_worker_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	movq	%r12, %r8
	callq	_vcos_thread_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movl	%ebx, 40(%r12)
	movq	%r15, 32(%r12)
	cmpl	$0, (%r12)
	je	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	movq	_graph_control_cb@GOTPCREL(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movl	(%r12), %eax
	cmpq	%rax, %rbx
	jae	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movq	(%rax,%rbx,8), %rcx
	movq	(%rcx), %rcx
	movq	%r12, 8(%rcx)
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rdi
	movl	(%r15), %esi
	callq	_mmal_port_enable
	movq	%rax, %r14
	cmpq	(%r13), %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rax
	movq	(%rax), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_LOG_ERROR
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	callq	_LOG_ERROR
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_12
LBB0_7:
	cmpl	$0, 4(%r12)
	je	LBB0_13
## %bb.8:
	xorl	%ebx, %ebx
	movq	_graph_connection_cb@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	(%r15), %eax
	movl	%eax, 8(%rdi)
	movq	%r12, (%rdi)
	callq	_mmal_connection_enable
	movq	%rax, %r14
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movl	4(%r12), %eax
	cmpq	%rax, %rbx
	jb	LBB0_10
LBB0_13:
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_vcos_semaphore_post
	jmp	LBB0_12
LBB0_11:
	movq	%r12, %rdi
	callq	_graph_stop_worker_thread
LBB0_12:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"graph: %p"

L_.str.1:                               ## @.str.1
	.asciz	"mmal graph thread"

	.comm	_graph_worker_thread,4,2        ## @graph_worker_thread
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"failed to create worker thread %p"

	.comm	_MMAL_ENOSPC,8,3                ## @MMAL_ENOSPC
	.comm	_graph_control_cb,4,2           ## @graph_control_cb
L_.str.3:                               ## @.str.3
	.asciz	"could not enable port %s"

	.comm	_graph_connection_cb,4,2        ## @graph_connection_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_enable              ; -- Begin function mmal_graph_enable
	.p2align	2
_mmal_graph_enable:                     ; @mmal_graph_enable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _MMAL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x20, [x23]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_LOG_TRACE
	add	x0, x19, #44
Lloh4:
	adrp	x8, _graph_worker_thread@GOTPAGE
Lloh5:
	ldr	x8, [x8, _graph_worker_thread@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, #0
	mov	x4, x19
	bl	_vcos_thread_create
Lloh9:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.1:
	str	w22, [x19, #40]
	str	x21, [x19, #32]
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.2:
	mov	x22, #0
Lloh12:
	adrp	x24, _graph_control_cb@GOTPAGE
Lloh13:
	ldr	x24, [x24, _graph_control_cb@GOTPAGEOFF]
Lloh14:
	adrp	x21, l_.str.3@PAGE
Lloh15:
	add	x21, x21, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	w8, [x19]
	cmp	x22, x8
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	lsl	x9, x22, #3
	ldr	x10, [x8, x9]
	ldr	x10, [x10]
	str	x19, [x10, #8]
	ldr	x8, [x8, x9]
	ldr	x0, [x8]
	ldr	w1, [x24]
	bl	_mmal_port_enable
	mov	x20, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x8, [x8]
	ldr	x1, [x8]
	mov	x0, x21
	bl	_LOG_ERROR
	b	LBB0_3
LBB0_6:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_LOG_ERROR
Lloh18:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
Lloh20:
	ldr	x20, [x8]
	b	LBB0_13
LBB0_7:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_11
; %bb.8:
	mov	x21, #0
Lloh21:
	adrp	x22, _graph_connection_cb@GOTPAGE
Lloh22:
	ldr	x22, [x22, _graph_connection_cb@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21, lsl #3]
	ldr	w8, [x22]
	str	w8, [x0, #8]
	str	x19, [x0]
	bl	_mmal_connection_enable
	mov	x20, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x21, x21, #1
	ldr	w8, [x19, #4]
	cmp	x21, x8
	b.lo	LBB0_9
LBB0_11:
	add	x0, x19, #8
	bl	_vcos_semaphore_post
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_graph_stop_worker_thread
LBB0_13:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"graph: %p"

l_.str.1:                               ; @.str.1
	.asciz	"mmal graph thread"

	.comm	_graph_worker_thread,4,2        ; @graph_worker_thread
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"failed to create worker thread %p"

	.comm	_MMAL_ENOSPC,8,3                ; @MMAL_ENOSPC
	.comm	_graph_control_cb,4,2           ; @graph_control_cb
l_.str.3:                               ; @.str.3
	.asciz	"could not enable port %s"

	.comm	_graph_connection_cb,4,2        ; @graph_connection_cb
.subsections_via_symbols
