	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_pool_initialise_buffer_headers
_mmal_pool_initialise_buffer_headers:   ## @mmal_pool_initialise_buffer_headers
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	leal	(,%rbx,8), %edi
	movq	_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ROUND_UP
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r13d
	cltq
	leaq	(%r14,%rax,4), %r14
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	callq	_LOG_TRACE
	movl	24(%r12), %edi
	movq	8(%r12), %rsi
	callq	*32(%r12)
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_7
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, 16(%r14)
	movq	8(%r12), %rax
	movq	%rax, 8(%r14)
	movq	_mmal_pool_buffer_header_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movl	%eax, 48(%rcx)
	movq	%r12, 40(%rcx)
	movl	$1, (%rcx)
	movq	%r15, 32(%rcx)
	movl	24(%r12), %eax
	movl	%eax, 24(%rcx)
	movq	16(%r12), %rax
	movq	%rax, 16(%rcx)
	movq	8(%r12), %rax
	movq	%rax, 8(%rcx)
	movq	%r14, (%rax,%rbx,8)
	incq	%rbx
	movl	%ebx, (%r12)
	movslq	%ebx, %rax
	leaq	(%r14,%rax,4), %r14
	cmpl	%eax, %r13d
	je	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_mmal_buffer_header_initialise
	movq	%rax, %r14
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 32(%r12)
	jne	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 32(%rax)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_LOG_TRACE
	movq	(%r14), %rax
	movl	24(%rax), %edi
	movq	32(%rax), %rsi
	callq	*16(%rax)
	jmp	LBB0_12
LBB0_13:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_LOG_ERROR
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_14:
	movl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ALIGN,4,2                      ## @ALIGN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocating %u bytes for payload %u/%u"

L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate payload %u/%u"

	.comm	_MMAL_ENOMEM,4,2                ## @MMAL_ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"freeing %u bytes for payload %u/%u"

	.comm	_mmal_pool_buffer_header_release,4,2 ## @mmal_pool_buffer_header_release
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.no_dead_strip	_mmal_pool_initialise_buffer_headers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_pool_initialise_buffer_headers
_mmal_pool_initialise_buffer_headers:   ; @mmal_pool_initialise_buffer_headers
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x25, [x0, #8]
	lsl	w0, w1, #3
Lloh0:
	adrp	x8, _ALIGN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALIGN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ROUND_UP
	cbz	w19, LBB0_12
; %bb.1:
	mov	x22, #0
	mov	x27, #0
	mov	w23, w19
Lloh3:
	adrp	x24, _mmal_pool_buffer_header_release@GOTPAGE
Lloh4:
	ldr	x24, [x24, _mmal_pool_buffer_header_release@GOTPAGEOFF]
	add	x25, x25, w0, sxtw #2
	mov	w28, #1
Lloh5:
	adrp	x26, l_.str@PAGE
Lloh6:
	add	x26, x26, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x26
	mov	x2, x22
	mov	x3, x23
	bl	_LOG_TRACE
	ldr	x8, [x21, #32]
	ldr	w0, [x21, #24]
	ldr	x1, [x21, #8]
	blr	x8
	mov	x27, x0
	cbz	x0, LBB0_14
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	x8, x9, [x21, #8]
	stp	x8, x27, [x25, #8]
	ldr	w8, [x24]
	ldr	x10, [x25]
	str	w8, [x10, #48]
	ldr	w8, [x21, #24]
	str	w8, [x10, #24]
	str	w28, [x10]
	stp	x27, x21, [x10, #32]
	str	x9, [x10, #16]
	ldr	x8, [x21, #8]
	str	x8, [x10, #8]
	str	x25, [x8, x22, lsl #3]
	add	x22, x22, #1
	str	w22, [x21]
	add	x25, x25, w22, sxtw #2
	cmp	w23, w22
	b.eq	LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x20, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x21]
	mov	x0, x25
	bl	_mmal_buffer_header_initialise
	mov	x25, x0
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #32]
	cbnz	x8, LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x8, #32]
	cbz	x9, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x22
	mov	x3, x19
	bl	_LOG_TRACE
	ldr	x8, [x25]
	ldr	x9, [x8, #16]
	ldr	w0, [x8, #24]
	ldr	x1, [x8, #32]
	blr	x9
	b	LBB0_3
LBB0_12:
Lloh9:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	mov	x2, x19
	bl	_LOG_ERROR
Lloh13:
	adrp	x8, _MMAL_ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMAL_ENOMEM@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ALIGN,4,2                      ; @ALIGN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocating %u bytes for payload %u/%u"

l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate payload %u/%u"

	.comm	_MMAL_ENOMEM,4,2                ; @MMAL_ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"freeing %u bytes for payload %u/%u"

	.comm	_mmal_pool_buffer_header_release,4,2 ; @mmal_pool_buffer_header_release
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.no_dead_strip	_mmal_pool_initialise_buffer_headers
.subsections_via_symbols
