	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_port_disable_internal
_mmal_port_disable_internal:            ## @mmal_port_disable_internal
	.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	%rdi, %r13
	movq	8(%rdi), %rax
	movq	8(%rax), %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r15
	movq	(%r15), %r14
	callq	_LOCK_PORT
	cmpl	$0, (%r13)
	je	LBB0_9
## %bb.1:
	movq	%r13, %rdi
	callq	_LOCK_SENDING
	movl	$0, (%r13)
	movq	%r13, %rdi
	callq	_UNLOCK_SENDING
	movl	20(%r13), %edi
	callq	_mmal_component_action_lock
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mmal_pool_callback_set
LBB0_3:
	movq	8(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	%rax, %r14
	movl	20(%r13), %edi
	callq	_mmal_component_action_unlock
	cmpq	(%r15), %r14
	jne	LBB0_4
## %bb.5:
	movq	8(%r13), %rax
	movq	8(%rax), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rbx
	movq	%r13, %rdi
	callq	_mmal_port_buffer_header_callback
	movq	%rbx, %rsi
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.7:
	movq	8(%r13), %rax
	movq	8(%rax), %rax
LBB0_8:
	leaq	8(%rax), %rcx
	movq	$0, 8(%rax)
	movq	%rcx, 16(%rax)
	movl	16(%r13), %r15d
	movq	%r13, %rdi
	callq	_IN_TRANSIT_COUNT
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	%r13, %rdi
	callq	_IN_TRANSIT_WAIT
	movl	16(%r13), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	8(%r13), %rax
	movq	8(%rax), %rax
	movq	$0, (%rax)
	jmp	LBB0_9
LBB0_4:
	movl	16(%r13), %r15d
	movq	%r14, %rdi
	callq	_mmal_status_to_string
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_LOG_ERROR
	movq	%r13, %rdi
	callq	_LOCK_SENDING
	movl	$1, (%r13)
	movq	%r13, %rdi
	callq	_UNLOCK_SENDING
LBB0_9:
	movq	%r13, %rdi
	callq	_UNLOCK_PORT
	movq	%r14, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port %p could not be disabled (%s)"

L_.str.1:                               ## @.str.1
	.asciz	"%s waiting for %i buffers left in transit"

L_.str.2:                               ## @.str.2
	.asciz	"%s has no buffers left in transit"

	.no_dead_strip	_mmal_port_disable_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_port_disable_internal
_mmal_port_disable_internal:            ; @mmal_port_disable_internal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x22, [x8, #8]
Lloh0:
	adrp	x21, _MMAL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x20, [x21]
	bl	_LOCK_PORT
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x0, x19
	bl	_LOCK_SENDING
	str	wzr, [x19]
	mov	x0, x19
	bl	_UNLOCK_SENDING
	ldr	w0, [x19, #20]
	bl	_mmal_component_action_lock
	ldr	x0, [x22, #24]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, #0
	mov	x2, #0
	bl	_mmal_pool_callback_set
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	ldr	w0, [x19, #20]
	bl	_mmal_component_action_unlock
	ldr	x8, [x21]
	cmp	x20, x8
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x1]
	mov	x0, x19
	bl	_mmal_port_buffer_header_callback
	mov	x1, x21
	cbnz	x21, LBB0_5
; %bb.6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
LBB0_7:
	str	xzr, [x8, #8]!
	str	x8, [x8, #8]
	ldr	w21, [x19, #16]
	mov	x0, x19
	bl	_IN_TRANSIT_COUNT
	str	x0, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_LOG_DEBUG
	mov	x0, x19
	bl	_IN_TRANSIT_WAIT
	ldr	w1, [x19, #16]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_LOG_DEBUG
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	str	xzr, [x8]
	b	LBB0_9
LBB0_8:
	ldr	w21, [x19, #16]
	mov	x0, x20
	bl	_mmal_status_to_string
	mov	x2, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_LOG_ERROR
	mov	x0, x19
	bl	_LOCK_SENDING
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_UNLOCK_SENDING
LBB0_9:
	mov	x0, x19
	bl	_UNLOCK_PORT
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port %p could not be disabled (%s)"

l_.str.1:                               ; @.str.1
	.asciz	"%s waiting for %i buffers left in transit"

l_.str.2:                               ; @.str.2
	.asciz	"%s has no buffers left in transit"

	.no_dead_strip	_mmal_port_disable_internal
.subsections_via_symbols
