	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_graph_create              ## -- Begin function mmal_graph_create
	.p2align	4, 0x90
_mmal_graph_create:                     ## @mmal_graph_create
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_LOG_TRACE
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	leal	16(%rbx), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %edi
	callq	_vcos_calloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	addq	$8, %rax
	movq	%rax, (%r15)
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movq	%r14, %rax
	addq	$16, %rax
	movq	%rax, 8(%r14)
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_vcos_semaphore_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_1:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_LOG_ERROR
	movq	%r14, %rdi
	callq	_vcos_free
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"graph %p, userdata_size %u"

	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"mmal connection graph"

	.comm	_MMAL_ENOMEM,4,2                ## @MMAL_ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"mmal graph sema"

	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"failed to create semaphore %p"

	.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_create              ; -- Begin function mmal_graph_create
	.p2align	2
_mmal_graph_create:                     ; @mmal_graph_create
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	bl	_LOG_TRACE
	cbz	x19, LBB0_6
; %bb.1:
	add	w1, w21, #16
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_vcos_calloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	add	x8, x0, #8
	str	x8, [x19]
	cbz	w21, LBB0_4
; %bb.3:
	add	x8, x20, #16
	str	x8, [x20, #8]
LBB0_4:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	bl	_vcos_semaphore_create
Lloh6:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:
Lloh9:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh11:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh13:
	adrp	x8, _MMAL_ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMAL_ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_LOG_ERROR
	mov	x0, x20
	bl	_vcos_free
Lloh17:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"graph %p, userdata_size %u"

	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"mmal connection graph"

	.comm	_MMAL_ENOMEM,4,2                ; @MMAL_ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"mmal graph sema"

	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"failed to create semaphore %p"

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