	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_new_connection      ## -- Begin function mmal_graph_new_connection
	.p2align	4, 0x90
_mmal_graph_new_connection:             ## @mmal_graph_new_connection
	.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
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.1:
	movq	%rdx, %r13
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.2:
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	_MMAL_PORT_TYPE_CLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	cmpq	%rax, (%r13)
	je	LBB0_6
	jmp	LBB0_11
LBB0_4:
	movq	_MMAL_PORT_TYPE_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.5:
	movq	(%r13), %rax
	movq	_MMAL_PORT_TYPE_INPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_6:
	movl	8(%rbx), %edx
	movl	8(%r13), %r8d
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rcx
	movq	%r13, %r9
	pushq	%r14
	pushq	%r12
	callq	_LOG_TRACE
	addq	$16, %rsp
	movq	(%r15), %rax
	movq	_GRAPH_CONNECTIONS_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_14
## %bb.7:
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_mmal_connection_create
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_13
## %bb.8:
	movq	-48(%rbp), %rax
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	leaq	1(%rcx), %rsi
	movq	%rsi, (%r15)
	movq	%rax, (%rdx,%rcx,8)
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	movq	-48(%rbp), %rdi
	callq	_mmal_connection_acquire
	movq	-48(%rbp), %rax
	movq	%rax, (%r14)
LBB0_10:
	movq	(%rbx), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movq	(%rax), %rax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	8(%rbx), %esi
	movl	8(%r13), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERROR
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.comm	_MMAL_PORT_TYPE_CLOCK,8,3       ## @MMAL_PORT_TYPE_CLOCK
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ## @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ## @MMAL_PORT_TYPE_INPUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"graph: %p, out: %s(%p), in: %s(%p), flags %x, connection: %p"

	.comm	_GRAPH_CONNECTIONS_MAX,8,3      ## @GRAPH_CONNECTIONS_MAX
L_.str.1:                               ## @.str.1
	.asciz	"no space for connection %s/%s"

	.comm	_MMAL_ENOSPC,8,3                ## @MMAL_ENOSPC
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_new_connection      ; -- Begin function mmal_graph_new_connection
	.p2align	2
_mmal_graph_new_connection:             ; @mmal_graph_new_connection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x1, LBB0_11
; %bb.1:
	mov	x21, x2
	cbz	x2, LBB0_11
; %bb.2:
	mov	x19, x4
	mov	x22, x3
	mov	x23, x1
	mov	x20, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _MMAL_PORT_TYPE_CLOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMAL_PORT_TYPE_CLOCK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x9, [x21]
	cmp	x9, x8
	b.eq	LBB0_6
	b	LBB0_11
LBB0_4:
Lloh3:
	adrp	x9, _MMAL_PORT_TYPE_OUTPUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMAL_PORT_TYPE_OUTPUT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.5:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _MMAL_PORT_TYPE_INPUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMAL_PORT_TYPE_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_6:
	ldr	w2, [x23, #8]
	ldr	w4, [x21, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x3, x23
	mov	x5, x21
	mov	x6, x22
	mov	x7, x19
	bl	_LOG_TRACE
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _GRAPH_CONNECTIONS_MAX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GRAPH_CONNECTIONS_MAX@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.7:
	add	x0, sp, #8
	mov	x1, x23
	mov	x2, x21
	mov	x3, x22
	bl	_mmal_connection_create
Lloh14:
	adrp	x21, _MMAL_SUCCESS@GOTPAGE
Lloh15:
	ldr	x21, [x21, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.8:
	ldr	x8, [sp, #8]
	ldp	x10, x9, [x20]
	add	x11, x10, #1
	str	x11, [x20]
	str	x8, [x9, x10, lsl #3]
	cbz	x19, LBB0_10
; %bb.9:
	ldr	x0, [sp, #8]
	bl	_mmal_connection_acquire
	ldr	x8, [sp, #8]
	str	x8, [x19]
LBB0_10:
	ldr	x0, [x21]
	b	LBB0_13
LBB0_11:
Lloh16:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	x0, [x8]
LBB0_13:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	ldr	w1, [x23, #8]
	ldr	w2, [x21, #8]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
Lloh20:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.comm	_MMAL_PORT_TYPE_CLOCK,8,3       ; @MMAL_PORT_TYPE_CLOCK
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ; @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ; @MMAL_PORT_TYPE_INPUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"graph: %p, out: %s(%p), in: %s(%p), flags %x, connection: %p"

	.comm	_GRAPH_CONNECTIONS_MAX,8,3      ; @GRAPH_CONNECTIONS_MAX
l_.str.1:                               ; @.str.1
	.asciz	"no space for connection %s/%s"

	.comm	_MMAL_ENOSPC,8,3                ; @MMAL_ENOSPC
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
.subsections_via_symbols
