	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_connection_destroy_internal
_mmal_connection_destroy_internal:      ## @mmal_connection_destroy_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	cmpq	$0, 32(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mmal_connection_disable
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_2:
	movq	_MMAL_CONNECTION_FLAG_TUNNELLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.3:
	movl	28(%rbx), %edi
	callq	_mmal_port_disconnect
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movl	24(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_LOG_ERROR
LBB0_5:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_mmal_pool_destroy
LBB0_7:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_mmal_queue_destroy
LBB0_9:
	movq	%rbx, %rdi
	callq	_vcos_free
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.comm	_MMAL_CONNECTION_FLAG_TUNNELLING,4,2 ## @MMAL_CONNECTION_FLAG_TUNNELLING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connection %s could not be cleared"

	.no_dead_strip	_mmal_connection_destroy_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_connection_destroy_internal
_mmal_connection_destroy_internal:      ; @mmal_connection_destroy_internal
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #32]
Lloh0:
	adrp	x20, _MMAL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MMAL_SUCCESS@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mmal_connection_disable
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_2:
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _MMAL_CONNECTION_FLAG_TUNNELLING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMAL_CONNECTION_FLAG_TUNNELLING@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	ldr	w0, [x19, #28]
	bl	_mmal_port_disconnect
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
	ldr	w1, [x19, #24]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG_ERROR
LBB0_5:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_mmal_pool_destroy
LBB0_7:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_mmal_queue_destroy
LBB0_9:
	mov	x0, x19
	bl	_vcos_free
	ldr	x0, [x20]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.comm	_MMAL_CONNECTION_FLAG_TUNNELLING,4,2 ; @MMAL_CONNECTION_FLAG_TUNNELLING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connection %s could not be cleared"

	.no_dead_strip	_mmal_connection_destroy_internal
.subsections_via_symbols
