	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gb_connection_destroy          ## -- Begin function gb_connection_destroy
	.p2align	4, 0x90
_gb_connection_destroy:                 ## @gb_connection_destroy
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_GB_CONNECTION_STATE_DISABLED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_gb_connection_disable
LBB0_3:
	movq	_gb_connection_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_gb_connections_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	leaq	24(%rbx), %rdi
	callq	_list_del
	leaq	20(%rbx), %rdi
	callq	_list_del
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	movl	16(%rbx), %edi
	callq	_destroy_workqueue
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_gb_hd_cport_release
	movq	_CPORT_ID_BAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gb_connection_put              ## TAILCALL
LBB0_4:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GB_CONNECTION_STATE_DISABLED,8,3 ## @GB_CONNECTION_STATE_DISABLED
	.comm	_gb_connection_mutex,4,2        ## @gb_connection_mutex
	.comm	_gb_connections_lock,4,2        ## @gb_connections_lock
	.comm	_CPORT_ID_BAD,4,2               ## @CPORT_ID_BAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gb_connection_destroy          ; -- Begin function gb_connection_destroy
	.p2align	2
_gb_connection_destroy:                 ; @gb_connection_destroy
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_4
; %bb.1:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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]
Lloh0:
	adrp	x9, _GB_CONNECTION_STATE_DISABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GB_CONNECTION_STATE_DISABLED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_gb_connection_disable
LBB0_3:
Lloh3:
	adrp	x20, _gb_connection_mutex@GOTPAGE
Lloh4:
	ldr	x20, [x20, _gb_connection_mutex@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
Lloh5:
	adrp	x21, _gb_connections_lock@GOTPAGE
Lloh6:
	ldr	x21, [x21, _gb_connections_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_lock_irq
	add	x0, x19, #24
	bl	_list_del
	add	x0, x19, #20
	bl	_list_del
	mov	x0, x21
	bl	_spin_unlock_irq
	ldr	w0, [x19, #16]
	bl	_destroy_workqueue
	ldp	w1, w0, [x19, #8]
	bl	_gb_hd_cport_release
Lloh7:
	adrp	x8, _CPORT_ID_BAD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CPORT_ID_BAD@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_gb_connection_put
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GB_CONNECTION_STATE_DISABLED,8,3 ; @GB_CONNECTION_STATE_DISABLED
	.comm	_gb_connection_mutex,4,2        ; @gb_connection_mutex
	.comm	_gb_connections_lock,4,2        ; @gb_connections_lock
	.comm	_CPORT_ID_BAD,4,2               ; @CPORT_ID_BAD
.subsections_via_symbols
