	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_vc_port_payload_alloc
_mmal_vc_port_payload_alloc:            ## @mmal_vc_port_payload_alloc
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	movq	(%rax), %r13
	movq	_MMAL_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	(%rdi), %ebx
	movq	8(%rdi), %rax
	movl	(%rax), %edx
	leaq	-45(%rbp), %rdi
	movl	$5, %esi
	callq	_mmal_4cc_to_string
	movq	(%r13), %r8
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_LOG_TRACE
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	movq	_MMAL_ENCODING_OPAQUE@GOTPCREL(%rip), %rdx
	movq	(%r13), %rax
	cmpl	(%rdx), %ecx
	jne	LBB0_5
## %bb.1:
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movl	(%r12), %edi
	callq	_mmal_vc_opaque_alloc_desc
	testq	%rax, %rax
	je	LBB0_3
## %bb.10:
	movq	%rax, %r15
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	incl	8(%r13)
	jmp	LBB0_11
LBB0_5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%r15, %rbx
	movq	%r14, %rdi
	callq	_mmal_vc_shm_alloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_11
## %bb.7:
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_8:
	movq	%r15, %rbx
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_vcos_calloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_9
LBB0_11:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.12:
	movq	8(%r12), %rax
	movl	(%rax), %eax
	movq	_MMAL_ENCODING_OPAQUE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_memset
LBB0_14:
	movl	(%r12), %esi
	leaq	L_.str.5(%rip), %rdi
	movq	%r15, %rdx
	callq	_LOG_DEBUG
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_15
LBB0_3:
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_4:
	xorl	%r15d, %r15d
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_LOG_ERROR
LBB0_15:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_TRUE,8,3                  ## @MMAL_TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: allocating %d bytes, format %s, is_zero_copy %d"

	.comm	_MMAL_ENCODING_OPAQUE,4,2       ## @MMAL_ENCODING_OPAQUE
	.comm	_MMAL_FALSE,8,3                 ## @MMAL_FALSE
L_.str.1:                               ## @.str.1
	.asciz	"%s: failed to allocate %d bytes opaque memory"

L_.str.2:                               ## @.str.2
	.asciz	"%s: failed to allocate %d bytes of shared memory"

L_.str.3:                               ## @.str.3
	.asciz	"mmal_vc_port payload"

L_.str.4:                               ## @.str.4
	.asciz	"could not allocate %i bytes"

L_.str.5:                               ## @.str.5
	.asciz	"%s: allocated at %p"

	.no_dead_strip	_mmal_vc_port_payload_alloc
.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_payload_alloc
_mmal_vc_port_payload_alloc:            ; @mmal_vc_port_payload_alloc
	.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
	mov	x19, x1
	mov	x20, x0
	ldp	x9, x8, [x0, #8]
	ldr	x24, [x8]
Lloh0:
	adrp	x8, _MMAL_TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_TRUE@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldr	w21, [x0]
	ldr	w2, [x9]
	add	x0, sp, #11
	mov	w1, #5
	bl	_mmal_4cc_to_string
	mov	x3, x0
	ldr	x4, [x24]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	bl	_LOG_TRACE
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
Lloh5:
	adrp	x23, _MMAL_ENCODING_OPAQUE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MMAL_ENCODING_OPAQUE@GOTPAGEOFF]
	ldr	w10, [x23]
	ldr	x8, [x24]
	cmp	w9, w10
	b.ne	LBB0_4
; %bb.1:
	cbz	x8, LBB0_7
; %bb.2:
	ldr	w0, [x20]
	bl	_mmal_vc_opaque_alloc_desc
	mov	x21, x0
	cbz	x0, LBB0_14
; %bb.3:
Lloh7:
	adrp	x8, _MMAL_FALSE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMAL_FALSE@GOTPAGEOFF]
Lloh9:
	ldr	x22, [x8]
	ldr	w8, [x24, #8]
	add	w8, w8, #1
	str	w8, [x24, #8]
	b	LBB0_8
LBB0_4:
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_mmal_vc_shm_alloc
	mov	x21, x0
	cbnz	x0, LBB0_8
; %bb.6:
	ldr	w1, [x20]
	str	x19, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_LOG_ERROR
	b	LBB0_12
LBB0_7:
Lloh12:
	adrp	x2, l_.str.3@PAGE
Lloh13:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x1, x19
	bl	_vcos_calloc
	mov	x21, x0
	cbz	x0, LBB0_13
LBB0_8:
	cbz	x22, LBB0_11
; %bb.9:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x21
	mov	w1, #0
	mov	x2, x19
	bl	_memset
LBB0_11:
	ldr	w1, [x20]
Lloh14:
	adrp	x0, l_.str.5@PAGE
Lloh15:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x2, x21
	bl	_LOG_DEBUG
LBB0_12:
	mov	x0, x21
	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_13:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_LOG_ERROR
	b	LBB0_12
LBB0_14:
	ldr	w1, [x20]
	str	x19, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
	b	LBB0_12
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_TRUE,8,3                  ; @MMAL_TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: allocating %d bytes, format %s, is_zero_copy %d"

	.comm	_MMAL_ENCODING_OPAQUE,4,2       ; @MMAL_ENCODING_OPAQUE
	.comm	_MMAL_FALSE,8,3                 ; @MMAL_FALSE
l_.str.1:                               ; @.str.1
	.asciz	"%s: failed to allocate %d bytes opaque memory"

l_.str.2:                               ; @.str.2
	.asciz	"%s: failed to allocate %d bytes of shared memory"

l_.str.3:                               ; @.str.3
	.asciz	"mmal_vc_port payload"

l_.str.4:                               ; @.str.4
	.asciz	"could not allocate %i bytes"

l_.str.5:                               ; @.str.5
	.asciz	"%s: allocated at %p"

	.no_dead_strip	_mmal_vc_port_payload_alloc
.subsections_via_symbols
