	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_pool_resize               ## -- Begin function mmal_pool_resize
	.p2align	4, 0x90
_mmal_pool_resize:                      ## @mmal_pool_resize
	.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	_MMAL_EINVAL@GOTPCREL(%rip), %r12
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.1:
	movl	%esi, %r14d
	testl	%esi, %esi
	je	LBB0_18
## %bb.2:
	movq	%rdx, %r15
	movq	%rdi, %r13
	movl	(%rdi), %eax
	cmpl	%r14d, %eax
	jne	LBB0_5
## %bb.3:
	movq	(%r13), %rax
	cmpq	%r15, %rax
	jne	LBB0_5
## %bb.4:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r12
	jmp	LBB0_18
LBB0_5:
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r13), %edi
	callq	_mmal_queue_get
	incl	%ebx
	cmpl	(%r13), %ebx
	jb	LBB0_7
LBB0_8:
	movq	$0, (%r13)
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mmal_pool_initialise_buffer_headers
	movl	$0, (%r13)
	cmpl	%r14d, 8(%r13)
	jae	LBB0_15
## %bb.9:
	movl	$0, 8(%r13)
	movq	8(%r13), %r12
	testq	%r12, %r12
	je	LBB0_10
## %bb.11:
	movq	%r12, %rdi
	callq	_vcos_free
	movl	12(%r13), %r12d
	jmp	LBB0_12
LBB0_10:
	shrq	$32, %r12
LBB0_12:
	imull	%r14d, %r12d
	leal	(,%r14,8), %edi
	movq	_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ROUND_UP
	addq	%rax, %r12
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_vcos_calloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movl	%r14d, 8(%r13)
LBB0_15:
	movq	%r15, (%r13)
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_mmal_pool_initialise_buffer_headers
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r13)
	je	LBB0_18
## %bb.16:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%r13), %edi
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_mmal_queue_put
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_17
	jmp	LBB0_18
LBB0_13:
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %r12
LBB0_18:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.comm	_ALIGN,4,2                      ## @ALIGN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MMAL buffer headers"

	.comm	_MMAL_ENOMEM,4,2                ## @MMAL_ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_pool_resize               ; -- Begin function mmal_pool_resize
	.p2align	2
_mmal_pool_resize:                      ; @mmal_pool_resize
	.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
Lloh0:
	adrp	x22, _MMAL_EINVAL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MMAL_EINVAL@GOTPAGEOFF]
	cbz	x0, LBB0_18
; %bb.1:
	mov	x20, x1
	cbz	w1, LBB0_18
; %bb.2:
	mov	x21, x2
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19]
	cmp	x8, x21
	b.eq	LBB0_16
LBB0_4:
	cbz	w8, LBB0_7
; %bb.5:
	mov	w22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #16]
	bl	_mmal_queue_get
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.lo	LBB0_6
LBB0_7:
	str	xzr, [x19]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_mmal_pool_initialise_buffer_headers
	str	wzr, [x19]
	ldr	w8, [x19, #8]
	cmp	w8, w20
	b.hs	LBB0_13
; %bb.8:
	str	wzr, [x19, #8]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_vcos_free
	ldr	w8, [x19, #12]
	b	LBB0_11
LBB0_10:
	lsr	x8, x0, #32
LBB0_11:
	mul	w22, w8, w20
	lsl	w0, w20, #3
Lloh2:
	adrp	x8, _ALIGN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ALIGN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_ROUND_UP
	add	x0, x0, x22
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_vcos_calloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_17
; %bb.12:
	str	w20, [x19, #8]
LBB0_13:
	str	x21, [x19]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_mmal_pool_initialise_buffer_headers
	ldr	w8, [x19]
	cbz	w8, LBB0_16
; %bb.14:
	mov	x20, #0
Lloh7:
	adrp	x22, _MMAL_SUCCESS@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MMAL_SUCCESS@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x20, lsl #2]
	bl	_mmal_queue_put
	add	x20, x20, #1
	ldr	w8, [x19]
	cmp	x20, x8
	b.lo	LBB0_15
	b	LBB0_18
LBB0_16:
Lloh9:
	adrp	x22, _MMAL_SUCCESS@GOTPAGE
Lloh10:
	ldr	x22, [x22, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh11:
	adrp	x22, _MMAL_ENOMEM@GOTPAGE
Lloh12:
	ldr	x22, [x22, _MMAL_ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x22]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.comm	_ALIGN,4,2                      ; @ALIGN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MMAL buffer headers"

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