	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_add_port            ## -- Begin function mmal_graph_add_port
	.p2align	4, 0x90
_mmal_graph_add_port:                   ## @mmal_graph_add_port
	.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
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	movl	4(%rsi), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	callq	_LOG_TRACE
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.4:
	leaq	16(%r14), %rax
	addq	$8, %r14
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_LOG_TRACE
LBB0_11:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_6:
	leaq	24(%r14), %rax
	addq	$4, %r14
	jmp	LBB0_8
LBB0_7:
	leaq	32(%r14), %rax
LBB0_8:
	movl	(%r14), %ecx
	movq	_GRAPH_CONNECTIONS_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jae	LBB0_10
## %bb.9:
	movq	(%rax), %rax
	leal	1(%rcx), %edx
	movl	%edx, (%r14)
	movq	%rbx, (%rax,%rcx,8)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movl	4(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERROR
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"graph: %p, port: %s(%p)"

	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.comm	_GRAPH_CONNECTIONS_MAX,4,2      ## @GRAPH_CONNECTIONS_MAX
L_.str.1:                               ## @.str.1
	.asciz	"no space for port %s"

	.comm	_MMAL_ENOSPC,4,2                ## @MMAL_ENOSPC
	.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_add_port            ; -- Begin function mmal_graph_add_port
	.p2align	2
_mmal_graph_add_port:                   ; @mmal_graph_add_port
	.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
	mov	x19, x0
	cbz	x1, LBB0_5
; %bb.1:
	mov	x20, x1
	ldr	w2, [x1, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x20
	bl	_LOG_TRACE
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.3:
	cmp	w8, #130
	b.ne	LBB0_6
; %bb.4:
	add	x8, x19, #16
	add	x19, x19, #8
	b	LBB0_9
LBB0_5:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	w2, #0
	mov	x3, #0
	bl	_LOG_TRACE
LBB0_6:
Lloh4:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
	add	x8, x19, #24
	add	x19, x19, #4
	b	LBB0_9
LBB0_8:
	add	x8, x19, #32
LBB0_9:
	ldr	w9, [x19]
Lloh6:
	adrp	x10, _GRAPH_CONNECTIONS_MAX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GRAPH_CONNECTIONS_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	b.hs	LBB0_11
; %bb.10:
	ldr	x8, [x8]
	add	w10, w9, #1
	str	w10, [x19]
	str	x20, [x8, x9, lsl #3]
Lloh9:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
	ldr	w1, [x20, #4]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
Lloh13:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
LBB0_12:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"graph: %p, port: %s(%p)"

	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.comm	_GRAPH_CONNECTIONS_MAX,4,2      ; @GRAPH_CONNECTIONS_MAX
l_.str.1:                               ; @.str.1
	.asciz	"no space for port %s"

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