	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_vc_port_disable
_mmal_vc_port_disable:                  ## @mmal_vc_port_disable
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r12
	movq	$8, -40(%rbp)
	movl	24(%r12), %eax
	movl	%eax, -44(%rbp)
	movq	_MMAL_WORKER_PORT_ACTION_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	20(%r12), %eax
	movl	%eax, -52(%rbp)
	xorl	%eax, %eax
	callq	_mmal_vc_get_client
	movq	_MMAL_WORKER_PORT_ACTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rsp)
	leaq	-56(%rbp), %rsi
	leaq	-64(%rbp), %r8
	leaq	-40(%rbp), %r9
	movl	%eax, %edi
	movl	$16, %edx
	callq	_mmal_vc_sendwait_message
	movq	%rax, %r14
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpq	%rax, %r14
	je	LBB0_1
## %bb.2:
	cmpq	%rax, %r14
	jne	LBB0_3
LBB0_4:
	cmpq	$0, 8(%r12)
	jne	LBB0_5
	jmp	LBB0_7
LBB0_1:
	xorl	%edi, %edi
	cmpq	$8, -40(%rbp)
	sete	%dil
	callq	_vcos_assert
	movq	-64(%rbp), %r14
	movq	(%r15), %rax
	cmpq	%rax, %r14
	je	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_LOG_ERROR
	cmpq	$0, 8(%r12)
	je	LBB0_7
LBB0_5:
	leaq	16(%r12), %r15
	movq	%r15, %rdi
	callq	_vcos_blockpool_available_count
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_vcos_assert
	movq	%r15, %rdi
	callq	_vcos_blockpool_delete
	movq	$0, 8(%r12)
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rbx), %rdi
	callq	_mmal_vc_do_callback
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_mmal_queue_length
	testq	%rax, %rax
	jne	LBB0_6
## %bb.8:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_mmal_vc_port_info_get
LBB0_10:
	movq	%r14, %rax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_WORKER_PORT_ACTION_DISABLE,4,2 ## @MMAL_WORKER_PORT_ACTION_DISABLE
	.comm	_MMAL_WORKER_PORT_ACTION,4,2    ## @MMAL_WORKER_PORT_ACTION
	.comm	_MMAL_FALSE,4,2                 ## @MMAL_FALSE
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to disable port - reason %d"

	.no_dead_strip	_mmal_vc_port_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_vc_port_disable
_mmal_vc_port_disable:                  ; @mmal_vc_port_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, #16]
	ldr	x22, [x8]
	mov	w8, #8
	str	x8, [sp]
	ldp	w9, w8, [x22, #20]
	str	w8, [sp, #20]
Lloh0:
	adrp	x8, _MMAL_WORKER_PORT_ACTION_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_WORKER_PORT_ACTION_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w9, w8, [sp, #12]
	bl	_mmal_vc_get_client
Lloh3:
	adrp	x8, _MMAL_WORKER_PORT_ACTION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMAL_WORKER_PORT_ACTION@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _MMAL_FALSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMAL_FALSE@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x8]
	add	x1, sp, #8
	add	x4, sp, #24
	mov	x5, sp
	mov	w2, #16
	bl	_mmal_vc_sendwait_message
Lloh9:
	adrp	x21, _MMAL_SUCCESS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [sp]
	cmp	x8, #8
	cset	w0, eq
	bl	_vcos_assert
	ldr	x20, [sp, #24]
	ldr	x8, [x21]
	cmp	x20, x8
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	mov	x20, x0
	cmp	x20, x8
	b.eq	LBB0_4
LBB0_3:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_LOG_ERROR
LBB0_4:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
; %bb.5:
	add	x21, x22, #16
	mov	x0, x21
	bl	_vcos_blockpool_available_count
	ldr	x8, [x19]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
	mov	x0, x21
	bl	_vcos_blockpool_delete
	str	xzr, [x22, #8]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x19, #8]
	bl	_mmal_vc_do_callback
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_mmal_queue_length
	cbnz	x0, LBB0_6
; %bb.8:
	ldr	x0, [x22]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_mmal_vc_port_info_get
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_WORKER_PORT_ACTION_DISABLE,4,2 ; @MMAL_WORKER_PORT_ACTION_DISABLE
	.comm	_MMAL_WORKER_PORT_ACTION,4,2    ; @MMAL_WORKER_PORT_ACTION
	.comm	_MMAL_FALSE,4,2                 ; @MMAL_FALSE
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to disable port - reason %d"

	.no_dead_strip	_mmal_vc_port_disable
.subsections_via_symbols
