	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_port_disable              ## -- Begin function mmal_port_disable
	.p2align	4, 0x90
_mmal_port_disable:                     ## @mmal_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
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	je	LBB0_14
## %bb.2:
	movq	32(%rbx), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movl	24(%rbx), %ecx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %r8
	callq	_LOG_TRACE
	movq	16(%rbx), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_12
## %bb.3:
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_LOCK_CONNECTION
	cmpl	$0, 12(%rbx)
	je	LBB0_13
## %bb.4:
	movq	(%r14), %r15
	testq	%r15, %r15
	je	LBB0_17
## %bb.5:
	movq	%r15, %rdi
	callq	_LOCK_CONNECTION
	movq	(%r15), %rax
	movq	_MMAL_PORT_TYPE_INPUT@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_mmal_port_disable_internal
	movq	%rax, %r14
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_21
LBB0_7:
	movq	%rbx, %rdi
	callq	_mmal_port_disable_internal
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_19
## %bb.8:
	movq	(%r15), %rax
	cmpq	(%r12), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_mmal_port_disable_internal
	cmpq	(%r13), %rax
	jne	LBB0_20
LBB0_10:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mmal_port_connection_disable
	movq	%rax, %r14
	cmpq	(%r13), %rax
	je	LBB0_23
## %bb.11:
	movl	8(%rbx), %r12d
	movq	%r14, %rdi
	callq	_mmal_status_to_string
	leaq	L_.str.4(%rip), %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	jmp	LBB0_22
LBB0_12:
	movq	_MMAL_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	%rbx, %rdi
	callq	_UNLOCK_CONNECTION
	movl	8(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_LOG_ERROR
LBB0_14:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	movq	(%rax), %r14
LBB0_16:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%rbx, %rdi
	callq	_mmal_port_disable_internal
	movq	%rax, %r14
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_24
## %bb.18:
	movl	8(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_24
LBB0_19:
	movq	%rax, %r14
	movl	8(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_23
LBB0_20:
	movq	%rax, %r14
LBB0_21:
	movl	8(%r15), %r12d
	movq	%r14, %rdi
	callq	_mmal_status_to_string
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
LBB0_22:
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_LOG_ERROR
LBB0_23:
	movq	%r15, %rdi
	callq	_UNLOCK_CONNECTION
LBB0_24:
	movq	%rbx, %rdi
	callq	_UNLOCK_CONNECTION
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s(%i:%i) port %p"

	.comm	_MMAL_ENOSYS,8,3                ## @MMAL_ENOSYS
L_.str.1:                               ## @.str.1
	.asciz	"port %s(%p) is not enabled"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ## @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"failed to disable connected port (%s)%p (%s)"

L_.str.3:                               ## @.str.3
	.asciz	"failed to disable port (%s)%p"

L_.str.4:                               ## @.str.4
	.asciz	"failed to disable connection (%s)%p (%s)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_port_disable              ; -- Begin function mmal_port_disable
	.p2align	2
_mmal_port_disable:                     ; @mmal_port_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_14
; %bb.2:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
	ldr	w2, [x19]
	ldr	w3, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x4, x19
	bl	_LOG_TRACE
	ldr	x8, [x19, #16]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_12
; %bb.3:
	ldr	x20, [x8]
	mov	x0, x19
	bl	_LOCK_CONNECTION
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_13
; %bb.4:
	ldr	x21, [x20]
	cbz	x21, LBB0_17
; %bb.5:
	mov	x0, x21
	bl	_LOCK_CONNECTION
	ldr	x8, [x21]
Lloh2:
	adrp	x23, _MMAL_PORT_TYPE_INPUT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MMAL_PORT_TYPE_INPUT@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh4:
	adrp	x22, _MMAL_SUCCESS@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MMAL_SUCCESS@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_mmal_port_disable_internal
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_21
LBB0_7:
	mov	x0, x19
	bl	_mmal_port_disable_internal
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.8:
	ldr	x8, [x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x21
	bl	_mmal_port_disable_internal
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_21
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_mmal_port_connection_disable
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_23
; %bb.11:
	ldr	w22, [x19, #8]
	mov	x0, x20
	bl	_mmal_status_to_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh6:
	adrp	x0, l_.str.4@PAGE
Lloh7:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	b	LBB0_20
LBB0_12:
Lloh8:
	adrp	x8, _MMAL_ENOSYS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MMAL_ENOSYS@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	mov	x0, x19
	bl	_UNLOCK_CONNECTION
	ldr	w1, [x19, #8]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_LOG_ERROR
LBB0_14:
Lloh12:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	x20, [x8]
LBB0_16:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
	mov	x0, x19
	bl	_mmal_port_disable_internal
	mov	x20, x0
Lloh14:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_24
; %bb.18:
	ldr	w1, [x19, #8]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_LOG_ERROR
	b	LBB0_24
LBB0_19:
	mov	x20, x0
	ldr	w1, [x19, #8]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_20:
	mov	x2, x19
	b	LBB0_22
LBB0_21:
	mov	x20, x0
	ldr	w22, [x21, #8]
	bl	_mmal_status_to_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	mov	x2, x21
LBB0_22:
	bl	_LOG_ERROR
LBB0_23:
	mov	x0, x21
	bl	_UNLOCK_CONNECTION
LBB0_24:
	mov	x0, x19
	bl	_UNLOCK_CONNECTION
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s(%i:%i) port %p"

	.comm	_MMAL_ENOSYS,8,3                ; @MMAL_ENOSYS
l_.str.1:                               ; @.str.1
	.asciz	"port %s(%p) is not enabled"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ; @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"failed to disable connected port (%s)%p (%s)"

l_.str.3:                               ; @.str.3
	.asciz	"failed to disable port (%s)%p"

l_.str.4:                               ; @.str.4
	.asciz	"failed to disable connection (%s)%p (%s)"

.subsections_via_symbols
