	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmalomx_ComponentUseBuffer
_mmalomx_ComponentUseBuffer:            ## @mmalomx_ComponentUseBuffer
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %r9
	movq	%rcx, %r8
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r15, (%rsp)
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	%r14d, %ecx
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_LOG_TRACE
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	testq	%r12, %r12
	je	LBB0_5
## %bb.2:
	movq	(%rbx), %rax
	movq	_OMX_StateInvalid@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	_OMX_ErrorInvalidState@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_4:
	movq	_OMX_ErrorInvalidComponent@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_5:
	movq	_OMX_ErrorBadParameter@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_6:
	cmpq	%r14, 8(%rbx)
	jbe	LBB0_13
## %bb.7:
	movq	%rbx, %rdi
	callq	_mmalomx_commands_actions_check
	movq	16(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r14,4), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rcx,8), %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_MMALOMX_LOCK_PORT
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	_MMALOMX_ACTION_CHECK_ALLOCATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rcx,%rdi,8)
	movq	_OMX_ErrorIncorrectStateOperation@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmoveq	%rax, %r13
	cmpl	$0, 4(%rcx,%rdi,8)
	cmovneq	%rax, %r13
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_21
## %bb.8:
	movq	8(%rcx,%rdi,8), %r13
	testq	%r13, %r13
	je	LBB0_16
## %bb.9:
	cmpq	$0, 32(%rcx,%rdi,8)
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_19
## %bb.10:
	movq	24(%rcx,%rdi,8), %rax
	movq	(%rax), %rdx
	cmpq	%rsi, %rdx
	ja	LBB0_17
## %bb.11:
	movq	8(%rax), %rdx
	cmpq	%rsi, %rdx
	jae	LBB0_23
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_18
LBB0_13:
	movq	_OMX_ErrorBadPortIndex@GOTPCREL(%rip), %rax
LBB0_14:
	movq	(%rax), %r13
LBB0_15:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	24(%rcx,%rdi,8), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, %rdx
	jbe	LBB0_22
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
LBB0_18:
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_LOG_ERROR
LBB0_19:
	movq	_OMX_ErrorBadParameter@GOTPCREL(%rip), %rax
LBB0_20:
	movq	(%rax), %r13
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_21:
	movq	%rbx, %rdi
	callq	_MMALOMX_UNLOCK_PORT
	jmp	LBB0_15
LBB0_22:
	leaq	(%rcx,%rdi,8), %rcx
	addq	$24, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, 8(%rax)
	jmp	LBB0_24
LBB0_23:
	leaq	(%rcx,%rdi,8), %rax
	addq	$24, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
LBB0_24:
	movl	$1, %edi
	movl	$72, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_27
## %bb.25:
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	(%r8,%rdi,8), %r10
	addq	$4, %r10
	movl	$72, (%rax)
	movq	_OMX_VERSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 64(%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 8(%rax)
	movq	%r15, 56(%rax)
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	movq	%r9, 48(%rax)
	movq	16(%r8,%rdi,8), %rcx
	movq	_OMX_DirInput@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_28
## %bb.26:
	movq	%r14, 16(%rax)
	movq	%rax, %rcx
	addq	$40, %rcx
	jmp	LBB0_29
LBB0_27:
	movq	_OMX_ErrorInsufficientResources@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_28:
	movq	%r14, 24(%rax)
	movq	%rax, %rcx
	addq	$32, %rcx
LBB0_29:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r9, (%rcx)
	movq	%rax, (%r12)
	incq	%r13
	movq	%r13, 4(%r10)
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r8,%rdi,8)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rax
	movq	16(%rax), %r14
	xorl	%eax, %eax
	cmpq	%r14, %r13
	sete	%al
	movl	%eax, (%r10)
	movq	%rbx, %rdi
	movq	%r10, %r12
	callq	_MMALOMX_UNLOCK_PORT
	movq	4(%r12), %rsi
	movq	(%r15), %rax
	movq	16(%rax), %rdx
	leaq	L_.str.3(%rip), %rdi
	callq	_LOG_DEBUG
	cmpq	%r14, %r13
	jne	LBB0_31
## %bb.30:
	movq	%rbx, %rdi
	callq	_mmalomx_commands_actions_signal
LBB0_31:
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_OMX_ErrorNone,8,3              ## @OMX_ErrorNone
	.comm	_MMAL_FALSE,8,3                 ## @MMAL_FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hComponent %p, ppBufferHdr %p, nPortIndex %i, pAppPrivate %p, nSizeBytes %i, pBuffer %p"

	.comm	_OMX_ErrorInvalidComponent,8,3  ## @OMX_ErrorInvalidComponent
	.comm	_OMX_ErrorBadParameter,8,3      ## @OMX_ErrorBadParameter
	.comm	_OMX_StateInvalid,8,3           ## @OMX_StateInvalid
	.comm	_OMX_ErrorInvalidState,8,3      ## @OMX_ErrorInvalidState
	.comm	_OMX_ErrorBadPortIndex,8,3      ## @OMX_ErrorBadPortIndex
	.comm	_MMALOMX_ACTION_CHECK_ALLOCATED,4,2 ## @MMALOMX_ACTION_CHECK_ALLOCATED
	.comm	_OMX_ErrorIncorrectStateOperation,8,3 ## @OMX_ErrorIncorrectStateOperation
L_.str.1:                               ## @.str.1
	.asciz	"buffer size too small (%i/%i)"

L_.str.2:                               ## @.str.2
	.asciz	"buffer size too big (%i/%i)"

	.comm	_OMX_ErrorInsufficientResources,8,3 ## @OMX_ErrorInsufficientResources
	.comm	_OMX_VERSION,4,2                ## @OMX_VERSION
	.comm	_OMX_DirInput,8,3               ## @OMX_DirInput
L_.str.3:                               ## @.str.3
	.asciz	"allocated %i/%i buffers"

	.no_dead_strip	_mmalomx_ComponentUseBuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmalomx_ComponentUseBuffer
_mmalomx_ComponentUseBuffer:            ; @mmalomx_ComponentUseBuffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x25, x5
	mov	x24, x4
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x27, _OMX_ErrorNone@GOTPAGE
Lloh1:
	ldr	x27, [x27, _OMX_ErrorNone@GOTPAGEOFF]
	ldr	x26, [x27]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x23
	mov	x3, x21
	mov	x4, x22
	mov	x5, x24
	mov	x6, x25
	bl	_LOG_TRACE
	cbz	x19, LBB0_4
; %bb.1:
	cbz	x23, LBB0_5
; %bb.2:
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _OMX_StateInvalid@GOTPAGE
Lloh5:
	ldr	x9, [x9, _OMX_StateInvalid@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
Lloh7:
	adrp	x8, _OMX_ErrorInvalidState@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OMX_ErrorInvalidState@GOTPAGEOFF]
Lloh9:
	ldr	x26, [x8]
	b	LBB0_20
LBB0_4:
Lloh10:
	adrp	x8, _OMX_ErrorInvalidComponent@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OMX_ErrorInvalidComponent@GOTPAGEOFF]
Lloh12:
	ldr	x26, [x8]
	b	LBB0_20
LBB0_5:
Lloh13:
	adrp	x8, _OMX_ErrorBadParameter@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OMX_ErrorBadParameter@GOTPAGEOFF]
Lloh15:
	ldr	x26, [x8]
	b	LBB0_20
LBB0_6:
	ldr	x8, [x19, #8]
	cmp	x8, x21
	b.ls	LBB0_13
; %bb.7:
	mov	x0, x19
	bl	_mmalomx_commands_actions_check
	ldr	x28, [x19, #16]
	mov	w8, #40
	madd	x20, x21, x8, x28
	mov	x0, x19
	mov	x1, x20
	bl	_MMALOMX_LOCK_PORT
	ldr	w8, [x20]
Lloh16:
	adrp	x9, _MMALOMX_ACTION_CHECK_ALLOCATED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MMALOMX_ACTION_CHECK_ALLOCATED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _OMX_ErrorIncorrectStateOperation@GOTPAGE
Lloh20:
	ldr	x10, [x10, _OMX_ErrorIncorrectStateOperation@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	tst	w9, w8
	csel	x8, x10, x26, eq
	mov	x11, x20
	ldr	w9, [x11, #4]!
	cmp	w9, #0
	csel	x26, x8, x10, eq
	ldr	x8, [x27]
	cmp	x26, x8
	b.ne	LBB0_19
; %bb.8:
	mov	w8, #40
	madd	x26, x21, x8, x28
	ldr	x12, [x26, #8]!
	cbz	x12, LBB0_14
; %bb.9:
	mov	w8, #40
	madd	x8, x21, x8, x28
	ldr	x8, [x8, #32]
	cbnz	x8, LBB0_17
; %bb.10:
	mov	w8, #40
	madd	x10, x21, x8, x28
	ldr	x8, [x10, #24]!
	ldr	x2, [x8]
	cmp	x2, x24
	b.hi	LBB0_15
; %bb.11:
	ldr	x2, [x8, #8]
	cmp	x2, x24
	b.hs	LBB0_22
; %bb.12:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_13:
Lloh24:
	adrp	x8, _OMX_ErrorBadPortIndex@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OMX_ErrorBadPortIndex@GOTPAGEOFF]
Lloh26:
	ldr	x26, [x8]
	b	LBB0_20
LBB0_14:
	mov	w8, #40
	madd	x10, x21, x8, x28
	ldr	x8, [x10, #24]!
	ldr	x2, [x8]
	cmp	x2, x24
	b.ls	LBB0_21
LBB0_15:
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_16:
	mov	x1, x24
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_LOG_ERROR
LBB0_17:
Lloh29:
	adrp	x8, _OMX_ErrorBadParameter@GOTPAGE
Lloh30:
	ldr	x8, [x8, _OMX_ErrorBadParameter@GOTPAGEOFF]
LBB0_18:
	ldr	x26, [x8]
LBB0_19:
	mov	x0, x19
	mov	x1, x20
	bl	_MMALOMX_UNLOCK_PORT
LBB0_20:
	mov	x0, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_21:
	str	x24, [x8, #8]
LBB0_22:
	stp	x12, x10, [sp, #8]              ; 16-byte Folded Spill
	str	x11, [sp, #24]                  ; 8-byte Folded Spill
	mov	w0, #1
	mov	w1, #72
	bl	_calloc
	cbz	x0, LBB0_25
; %bb.23:
	mov	w8, #72
	str	w8, [x0]
Lloh31:
	adrp	x8, _OMX_VERSION@GOTPAGE
Lloh32:
	ldr	x8, [x8, _OMX_VERSION@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [x0, #64]
	str	x24, [x0, #8]
	stp	x22, x25, [x0, #48]
	mov	w8, #40
	madd	x8, x21, x8, x28
	ldr	x8, [x8, #16]
Lloh34:
	adrp	x9, _OMX_DirInput@GOTPAGE
Lloh35:
	ldr	x9, [x9, _OMX_DirInput@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_26
; %bb.24:
	str	x21, [x0, #16]
	add	x8, x0, #40
	b	LBB0_27
LBB0_25:
Lloh37:
	adrp	x8, _OMX_ErrorInsufficientResources@GOTPAGE
Lloh38:
	ldr	x8, [x8, _OMX_ErrorInsufficientResources@GOTPAGEOFF]
	b	LBB0_18
LBB0_26:
	str	x21, [x0, #24]
	add	x8, x0, #32
LBB0_27:
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	x22, [x8]
	str	x0, [x23]
	add	x22, x9, #1
	str	x22, [x26]
Lloh39:
	adrp	x8, _MMAL_FALSE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MMAL_FALSE@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	mov	w9, #40
	madd	x9, x21, x9, x28
	str	x8, [x9, #32]
	ldp	x23, x11, [sp, #16]             ; 16-byte Folded Reload
	ldr	x8, [x23]
	ldr	x21, [x8, #16]
	cmp	x22, x21
	cset	w8, eq
	str	w8, [x11]
	mov	x0, x19
	mov	x1, x20
	bl	_MMALOMX_UNLOCK_PORT
	ldr	x1, [x26]
	ldr	x8, [x23]
	ldr	x2, [x8, #16]
Lloh42:
	adrp	x0, l_.str.3@PAGE
Lloh43:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_LOG_DEBUG
	cmp	x22, x21
	b.ne	LBB0_29
; %bb.28:
	mov	x0, x19
	bl	_mmalomx_commands_actions_signal
LBB0_29:
	ldr	x26, [x27]
	b	LBB0_20
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_OMX_ErrorNone,8,3              ; @OMX_ErrorNone
	.comm	_MMAL_FALSE,8,3                 ; @MMAL_FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hComponent %p, ppBufferHdr %p, nPortIndex %i, pAppPrivate %p, nSizeBytes %i, pBuffer %p"

	.comm	_OMX_ErrorInvalidComponent,8,3  ; @OMX_ErrorInvalidComponent
	.comm	_OMX_ErrorBadParameter,8,3      ; @OMX_ErrorBadParameter
	.comm	_OMX_StateInvalid,8,3           ; @OMX_StateInvalid
	.comm	_OMX_ErrorInvalidState,8,3      ; @OMX_ErrorInvalidState
	.comm	_OMX_ErrorBadPortIndex,8,3      ; @OMX_ErrorBadPortIndex
	.comm	_MMALOMX_ACTION_CHECK_ALLOCATED,4,2 ; @MMALOMX_ACTION_CHECK_ALLOCATED
	.comm	_OMX_ErrorIncorrectStateOperation,8,3 ; @OMX_ErrorIncorrectStateOperation
l_.str.1:                               ; @.str.1
	.asciz	"buffer size too small (%i/%i)"

l_.str.2:                               ; @.str.2
	.asciz	"buffer size too big (%i/%i)"

	.comm	_OMX_ErrorInsufficientResources,8,3 ; @OMX_ErrorInsufficientResources
	.comm	_OMX_VERSION,4,2                ; @OMX_VERSION
	.comm	_OMX_DirInput,8,3               ; @OMX_DirInput
l_.str.3:                               ; @.str.3
	.asciz	"allocated %i/%i buffers"

	.no_dead_strip	_mmalomx_ComponentUseBuffer
.subsections_via_symbols
