	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_format_extradata_alloc    ## -- Begin function mmal_format_extradata_alloc
	.p2align	4, 0x90
_mmal_format_extradata_alloc:           ## @mmal_format_extradata_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_EXTRADATA_SIZE_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_2:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	cmpl	%esi, (%rdi)
	jae	LBB0_8
## %bb.3:
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	callq	_vcos_free
LBB0_5:
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_vcos_calloc
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	%ebx, (%r14)
	jmp	LBB0_10
LBB0_8:
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	8(%r14), %rax
LBB0_10:
	movq	%rax, 16(%r14)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTRADATA_SIZE_MAX,4,2         ## @EXTRADATA_SIZE_MAX
	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmal format extradata"

	.comm	_MMAL_ENOMEM,4,2                ## @MMAL_ENOMEM
	.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_format_extradata_alloc    ; -- Begin function mmal_format_extradata_alloc
	.p2align	2
_mmal_format_extradata_alloc:           ; @mmal_format_extradata_alloc
	.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
Lloh0:
	adrp	x8, _EXTRADATA_SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXTRADATA_SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	ldr	x0, [x0, #24]
	cmp	w8, w1
	b.hs	LBB0_7
; %bb.3:
	cbz	x0, LBB0_5
; %bb.4:
	bl	_vcos_free
LBB0_5:
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	mov	x1, x20
	bl	_vcos_calloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.6:
	str	w20, [x19]
	b	LBB0_9
LBB0_7:
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	x0, [x19, #8]
LBB0_9:
	str	x0, [x19, #16]
Lloh7:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh9:
	adrp	x8, _MMAL_ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTRADATA_SIZE_MAX,4,2         ; @EXTRADATA_SIZE_MAX
	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmal format extradata"

	.comm	_MMAL_ENOMEM,4,2                ; @MMAL_ENOMEM
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
.subsections_via_symbols
