	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_port_populate_from_pool
_mmal_port_populate_from_pool:          ## @mmal_port_populate_from_pool
	.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	16(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	8(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_LOG_TRACE
	cmpq	$0, (%r15)
	jle	LBB0_9
## %bb.3:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_mmal_port_send_buffer
	movq	%rax, %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	cmpq	(%r15), %r13
	jl	LBB0_5
	jmp	LBB0_9
LBB0_1:
	movq	_MMAL_ENOSYS@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERROR
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_LOG_ERROR
	movq	%rbx, %rdi
	callq	_mmal_buffer_header_release
LBB0_9:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.comm	_MMAL_ENOSYS,8,3                ## @MMAL_ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s port %p, pool: %p"

L_.str.1:                               ## @.str.1
	.asciz	"too few buffers in the pool"

	.comm	_MMAL_ENOMEM,8,3                ## @MMAL_ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"failed to send buffer to port"

	.no_dead_strip	_mmal_port_populate_from_pool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_port_populate_from_pool
_mmal_port_populate_from_pool:          ; @mmal_port_populate_from_pool
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _MMAL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x21, [x23]
	ldr	w1, [x0, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_LOG_TRACE
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x24, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_mmal_queue_get
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	bl	_mmal_port_send_buffer
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldr	x8, [x20]
	cmp	x24, x8
	b.lt	LBB0_3
	b	LBB0_9
LBB0_6:
Lloh4:
	adrp	x8, _MMAL_ENOSYS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MMAL_ENOSYS@GOTPAGEOFF]
Lloh6:
	ldr	x21, [x8]
	b	LBB0_9
LBB0_7:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
Lloh9:
	adrp	x8, _MMAL_ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	x21, [x8]
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_LOG_ERROR
	mov	x0, x22
	bl	_mmal_buffer_header_release
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.comm	_MMAL_ENOSYS,8,3                ; @MMAL_ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s port %p, pool: %p"

l_.str.1:                               ; @.str.1
	.asciz	"too few buffers in the pool"

	.comm	_MMAL_ENOMEM,8,3                ; @MMAL_ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"failed to send buffer to port"

	.no_dead_strip	_mmal_port_populate_from_pool
.subsections_via_symbols
