	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_vc_port_connect
_mmal_vc_port_connect:                  ## @mmal_vc_port_connect
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rax), %r12
	movq	$8, -48(%rbp)
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	(%rax), %rax
	movq	(%r15), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_3:
	movl	12(%r12), %eax
	movl	%eax, -52(%rbp)
	testq	%r15, %r15
	jne	LBB0_4
## %bb.5:
	movq	_MMAL_WORKER_PORT_ACTION_DISCONNECT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_MMAL_WORKER_PORT_ACTION_CONNECT@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	8(%r12), %eax
	movl	%eax, -60(%rbp)
	je	LBB0_8
## %bb.7:
	movq	(%r15), %rax
	movq	8(%rax), %rax
	movl	12(%rax), %ecx
	movl	%ecx, -64(%rbp)
	movl	8(%rax), %eax
	movl	%eax, -68(%rbp)
LBB0_8:
	xorl	%eax, %eax
	callq	_mmal_vc_get_client
	movq	_MMAL_WORKER_PORT_ACTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rsp)
	leaq	-72(%rbp), %rsi
	leaq	-80(%rbp), %r8
	leaq	-48(%rbp), %r9
	movl	%eax, %edi
	movl	$24, %edx
	callq	_mmal_vc_sendwait_message
	movq	%rax, %rbx
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	cmpq	%rax, %rbx
	jne	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	cmpq	$8, -48(%rbp)
	sete	%dil
	callq	_vcos_assert
	movq	-80(%rbp), %rbx
	movq	(%r13), %rax
LBB0_10:
	cmpq	%rax, %rbx
	jne	LBB0_11
## %bb.12:
	testq	%r15, %r15
	je	LBB0_14
## %bb.13:
	movq	%r15, (%r12)
	movq	(%r15), %rcx
	movq	8(%rcx), %rcx
	movq	%r14, (%rcx)
	jmp	LBB0_17
LBB0_11:
	movq	%rbx, %rdi
	callq	_mmal_status_to_string
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_LOG_ERROR
	movq	%rbx, %rax
	jmp	LBB0_17
LBB0_2:
	movq	_MMAL_ENOSYS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_17
LBB0_14:
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.15:
	movq	(%rcx), %rcx
	movq	8(%rcx), %rcx
	movq	$0, (%rcx)
LBB0_16:
	movq	$0, (%r12)
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_ENOSYS,8,3                ## @MMAL_ENOSYS
	.comm	_MMAL_WORKER_PORT_ACTION_CONNECT,4,2 ## @MMAL_WORKER_PORT_ACTION_CONNECT
	.comm	_MMAL_WORKER_PORT_ACTION_DISCONNECT,4,2 ## @MMAL_WORKER_PORT_ACTION_DISCONNECT
	.comm	_MMAL_WORKER_PORT_ACTION,4,2    ## @MMAL_WORKER_PORT_ACTION
	.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 connect ports: %s"

	.no_dead_strip	_mmal_vc_port_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_vc_port_connect
_mmal_vc_port_connect:                  ; @mmal_vc_port_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x22, [x8, #8]
	mov	w9, #8
	str	x9, [sp, #8]
	cbz	x1, LBB0_2
; %bb.1:
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_2:
	ldr	w8, [x22, #12]
	str	w8, [sp, #36]
Lloh0:
	adrp	x8, _MMAL_WORKER_PORT_ACTION_CONNECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_WORKER_PORT_ACTION_CONNECT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MMAL_WORKER_PORT_ACTION_DISCONNECT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMAL_WORKER_PORT_ACTION_DISCONNECT@GOTPAGEOFF]
	cmp	x20, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #32]
	ldr	w8, [x22, #8]
	str	w8, [sp, #28]
	cbz	x20, LBB0_4
; %bb.3:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	d0, [x8, #8]
	stur	d0, [sp, #20]
LBB0_4:
	bl	_mmal_vc_get_client
Lloh4:
	adrp	x8, _MMAL_WORKER_PORT_ACTION@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MMAL_WORKER_PORT_ACTION@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
Lloh7:
	adrp	x8, _MMAL_FALSE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMAL_FALSE@GOTPAGEOFF]
Lloh9:
	ldr	w6, [x8]
	add	x1, sp, #16
	add	x4, sp, #40
	add	x5, sp, #8
	mov	w2, #24
	bl	_mmal_vc_sendwait_message
	mov	x21, x0
Lloh10:
	adrp	x23, _MMAL_SUCCESS@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x0, [x23]
	cmp	x21, x0
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [sp, #8]
	cmp	x8, #8
	cset	w0, eq
	bl	_vcos_assert
	ldr	x21, [sp, #40]
	ldr	x0, [x23]
LBB0_6:
	cmp	x21, x0
	b.ne	LBB0_9
; %bb.7:
	cbz	x20, LBB0_11
; %bb.8:
	str	x20, [x22]
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	str	x19, [x8]
	b	LBB0_14
LBB0_9:
	mov	x0, x21
	bl	_mmal_status_to_string
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG_ERROR
	mov	x0, x21
	b	LBB0_14
LBB0_10:
Lloh14:
	adrp	x8, _MMAL_ENOSYS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMAL_ENOSYS@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	b	LBB0_14
LBB0_11:
	ldr	x8, [x22]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	str	xzr, [x8]
LBB0_13:
	str	xzr, [x22]
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_ENOSYS,8,3                ; @MMAL_ENOSYS
	.comm	_MMAL_WORKER_PORT_ACTION_CONNECT,4,2 ; @MMAL_WORKER_PORT_ACTION_CONNECT
	.comm	_MMAL_WORKER_PORT_ACTION_DISCONNECT,4,2 ; @MMAL_WORKER_PORT_ACTION_DISCONNECT
	.comm	_MMAL_WORKER_PORT_ACTION,4,2    ; @MMAL_WORKER_PORT_ACTION
	.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 connect ports: %s"

	.no_dead_strip	_mmal_vc_port_connect
.subsections_via_symbols
