	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_port_disable      ## -- Begin function mmal_wrapper_port_disable
	.p2align	4, 0x90
_mmal_wrapper_port_disable:             ## @mmal_wrapper_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	%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, %rbx
	movq	24(%rdi), %r15
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	movq	%rax, %r14
	movl	20(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_LOG_TRACE
	movq	(%rbx), %rax
	movq	_MMAL_PORT_TYPE_INPUT@GOTPCREL(%rip), %rcx
	movq	_MMAL_PORT_TYPE_OUTPUT@GOTPCREL(%rip), %r13
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	cmpq	(%r13), %rax
	je	LBB0_3
## %bb.2:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_14
LBB0_3:
	cmpl	$0, 16(%rbx)
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_mmal_port_disable
	movq	%rax, %r12
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_6
## %bb.7:
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_13
## %bb.8:
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movq	8(%rbx), %rdx
	movq	(%rcx,%rdx,8), %r13
	movq	(%rax,%rdx,8), %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %rdi
	callq	_mmal_buffer_header_release
	jmp	LBB0_10
LBB0_4:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_14
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERROR
	jmp	LBB0_14
LBB0_11:
	movl	8(%r13), %edi
	callq	_mmal_queue_length
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	callq	_LOG_ERROR
LBB0_13:
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	subq	%r14, %rax
	movq	%rax, (%r15)
LBB0_14:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ## @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ## @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"could not disable port"

L_.str.2:                               ## @.str.2
	.asciz	"coul dnot release all buffers"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_port_disable      ; -- Begin function mmal_wrapper_port_disable
	.p2align	2
_mmal_wrapper_port_disable:             ; @mmal_wrapper_port_disable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x0
	ldr	x19, [x0, #24]
	bl	_vcos_getmicrosecs
	mov	x20, x0
	ldr	w2, [x22, #20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_LOG_TRACE
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _MMAL_PORT_TYPE_INPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMAL_PORT_TYPE_INPUT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x23, _MMAL_PORT_TYPE_OUTPUT@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MMAL_PORT_TYPE_OUTPUT@GOTPAGEOFF]
	ldr	x10, [x23]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
; %bb.1:
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_8
; %bb.2:
	mov	x0, x22
	bl	_mmal_port_disable
	mov	x21, x0
Lloh7:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.3:
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.4:
	ldr	x8, [x22, #8]
	lsl	x8, x8, #3
	ldp	x10, x9, [x19, #8]
	ldr	x23, [x9, x8]
	ldr	x22, [x10, x8]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_mmal_queue_get
	cbz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_mmal_buffer_header_release
	b	LBB0_5
LBB0_7:
Lloh10:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	x21, [x8]
	b	LBB0_13
LBB0_8:
Lloh13:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh15:
	ldr	x21, [x8]
	b	LBB0_13
LBB0_9:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
	b	LBB0_13
LBB0_10:
	ldr	w0, [x23, #8]
	bl	_mmal_queue_length
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_verify
	cbnz	w0, LBB0_12
; %bb.11:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_LOG_ERROR
LBB0_12:
	bl	_vcos_getmicrosecs
	sub	x8, x0, x20
	str	x8, [x19]
LBB0_13:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ; @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ; @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"could not disable port"

l_.str.2:                               ; @.str.2
	.asciz	"coul dnot release all buffers"

.subsections_via_symbols
