	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmalomx_ComponentFreeBuffer
_mmalomx_ComponentFreeBuffer:           ## @mmalomx_ComponentFreeBuffer
	.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, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_LOG_TRACE
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	testq	%r15, %r15
	je	LBB0_3
## %bb.4:
	cmpq	%rbx, (%r14)
	jbe	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	callq	_mmalomx_commands_actions_check
	movq	8(%r14), %r13
	shlq	$5, %rbx
	leaq	(%rbx,%r13), %r12
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_MMALOMX_LOCK_PORT
	movl	(%r13,%rbx), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	decl	%eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, (%r12)
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r13,%rbx)
	movq	_MMALOMX_ACTION_CHECK_DEALLOCATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r13,%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r13,%rbx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_MMALOMX_UNLOCK_PORT
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.9:
	movq	16(%r13,%rbx), %rdi
	movl	(%r15), %esi
	callq	_mmal_port_payload_free
	movq	%r15, %rdi
	callq	_free
	cmpl	$0, 24(%r13,%rbx)
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jne	LBB0_12
## %bb.10:
	leaq	(%rbx,%r13), %rax
	addq	$16, %rax
	movq	(%rax), %rdi
	movq	_MMAL_PARAMETER_ZERO_COPY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mmal_port_parameter_set_boolean
	jmp	LBB0_12
LBB0_1:
	movq	_OMX_ErrorInvalidComponent@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_3:
	movq	_OMX_ErrorBadParameter@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_5:
	movq	_OMX_ErrorBadPortIndex@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_7:
	movq	_OMX_ErrorBadParameter@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_MMALOMX_UNLOCK_PORT
	jmp	LBB0_18
LBB0_11:
	movq	%r15, %rdi
	callq	_free
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_12:
	movq	16(%r13,%rbx), %rax
	movq	(%rax), %rdx
	movl	(%r12), %eax
	movq	%rdx, %rsi
	subq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_DEBUG
	testl	%r15d, %r15d
	jne	LBB0_14
## %bb.13:
	movq	_OMX_EventError@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OMX_ErrorPortUnpopulated@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mmalomx_callback_event_handler
LBB0_14:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_mmalomx_commands_actions_signal
LBB0_16:
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMX_ErrorNone,4,2              ## @OMX_ErrorNone
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hComponent %p, nPortIndex %i, pBuffer %p"

	.comm	_OMX_ErrorInvalidComponent,4,2  ## @OMX_ErrorInvalidComponent
	.comm	_OMX_ErrorBadParameter,4,2      ## @OMX_ErrorBadParameter
	.comm	_OMX_ErrorBadPortIndex,4,2      ## @OMX_ErrorBadPortIndex
	.comm	_MMAL_FALSE,4,2                 ## @MMAL_FALSE
	.comm	_MMALOMX_ACTION_CHECK_DEALLOCATED,4,2 ## @MMALOMX_ACTION_CHECK_DEALLOCATED
	.comm	_MMAL_PARAMETER_ZERO_COPY,4,2   ## @MMAL_PARAMETER_ZERO_COPY
L_.str.1:                               ## @.str.1
	.asciz	"freed %i/%i buffers"

	.comm	_OMX_EventError,4,2             ## @OMX_EventError
	.comm	_OMX_ErrorPortUnpopulated,4,2   ## @OMX_ErrorPortUnpopulated
	.no_dead_strip	_mmalomx_ComponentFreeBuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmalomx_ComponentFreeBuffer
_mmalomx_ComponentFreeBuffer:           ; @mmalomx_ComponentFreeBuffer
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	mov	x3, x22
	bl	_LOG_TRACE
	cbz	x19, LBB0_7
; %bb.1:
	cbz	x22, LBB0_8
; %bb.2:
	ldr	x8, [x19]
	cmp	x8, x20
	b.ls	LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_mmalomx_commands_actions_check
	ldr	x24, [x19, #8]
	add	x21, x24, x20, lsl #5
	mov	x0, x19
	mov	x1, x21
	bl	_MMALOMX_LOCK_PORT
	ldr	w8, [x21]
	cbz	w8, LBB0_10
; %bb.4:
	sub	w23, w8, #1
	str	w23, [x21]
Lloh2:
	adrp	x26, _MMAL_FALSE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MMAL_FALSE@GOTPAGEOFF]
	ldr	w8, [x26]
	str	w8, [x21, #28]
Lloh4:
	adrp	x8, _MMALOMX_ACTION_CHECK_DEALLOCATED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MMALOMX_ACTION_CHECK_DEALLOCATED@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldp	w9, w27, [x21, #4]
	and	w25, w8, w9
	mov	x0, x19
	mov	x1, x21
	bl	_MMALOMX_UNLOCK_PORT
	cbz	w27, LBB0_11
; %bb.5:
	add	x27, x24, x20, lsl #5
	ldr	x0, [x27, #16]!
	ldr	w1, [x22]
	bl	_mmal_port_payload_free
	mov	x0, x22
	bl	_free
	ldr	w8, [x27, #8]
	cbnz	w8, LBB0_12
; %bb.6:
	ldr	x0, [x27]
Lloh7:
	adrp	x8, _MMAL_PARAMETER_ZERO_COPY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMAL_PARAMETER_ZERO_COPY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x26]
	bl	_mmal_port_parameter_set_boolean
	b	LBB0_12
LBB0_7:
Lloh10:
	adrp	x8, _OMX_ErrorInvalidComponent@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OMX_ErrorInvalidComponent@GOTPAGEOFF]
	b	LBB0_17
LBB0_8:
Lloh12:
	adrp	x8, _OMX_ErrorBadParameter@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OMX_ErrorBadParameter@GOTPAGEOFF]
	b	LBB0_17
LBB0_9:
Lloh14:
	adrp	x8, _OMX_ErrorBadPortIndex@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OMX_ErrorBadPortIndex@GOTPAGEOFF]
	b	LBB0_17
LBB0_10:
Lloh16:
	adrp	x8, _OMX_ErrorBadParameter@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OMX_ErrorBadParameter@GOTPAGEOFF]
Lloh18:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_MMALOMX_UNLOCK_PORT
	b	LBB0_18
LBB0_11:
	mov	x0, x22
	bl	_free
LBB0_12:
	add	x8, x24, x20, lsl #5
	ldr	x8, [x8, #16]
	ldr	x2, [x8]
	ldr	w8, [x21]
	sub	x1, x2, x8
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_DEBUG
	cbnz	w25, LBB0_14
; %bb.13:
Lloh21:
	adrp	x8, _OMX_EventError@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OMX_EventError@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _OMX_ErrorPortUnpopulated@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OMX_ErrorPortUnpopulated@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	x4, #0
	bl	_mmalomx_callback_event_handler
LBB0_14:
	cbnz	w23, LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_mmalomx_commands_actions_signal
LBB0_16:
Lloh27:
	adrp	x8, _OMX_ErrorNone@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OMX_ErrorNone@GOTPAGEOFF]
LBB0_17:
	ldr	w20, [x8]
LBB0_18:
	mov	x0, x20
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_OMX_ErrorNone,4,2              ; @OMX_ErrorNone
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hComponent %p, nPortIndex %i, pBuffer %p"

	.comm	_OMX_ErrorInvalidComponent,4,2  ; @OMX_ErrorInvalidComponent
	.comm	_OMX_ErrorBadParameter,4,2      ; @OMX_ErrorBadParameter
	.comm	_OMX_ErrorBadPortIndex,4,2      ; @OMX_ErrorBadPortIndex
	.comm	_MMAL_FALSE,4,2                 ; @MMAL_FALSE
	.comm	_MMALOMX_ACTION_CHECK_DEALLOCATED,4,2 ; @MMALOMX_ACTION_CHECK_DEALLOCATED
	.comm	_MMAL_PARAMETER_ZERO_COPY,4,2   ; @MMAL_PARAMETER_ZERO_COPY
l_.str.1:                               ; @.str.1
	.asciz	"freed %i/%i buffers"

	.comm	_OMX_EventError,4,2             ; @OMX_EventError
	.comm	_OMX_ErrorPortUnpopulated,4,2   ; @OMX_ErrorPortUnpopulated
	.no_dead_strip	_mmalomx_ComponentFreeBuffer
.subsections_via_symbols
