	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hso_free_serial_device
_hso_free_serial_device:                ## @hso_free_serial_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_dev2ser
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_hso_serial_common_free
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.2:
	addq	$8, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rdi
	decq	(%rdi)
	je	LBB0_3
## %bb.4:
	addq	$8, %rdi
	callq	_mutex_unlock
	jmp	LBB0_5
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	callq	_hso_free_shared_int
LBB0_5:
	movq	%rbx, %rdi
	callq	_hso_free_tiomget
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hso_free_serial_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hso_free_serial_device
_hso_free_serial_device:                ; @hso_free_serial_device
	.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
	bl	_dev2ser
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_hso_serial_common_free
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.2:
	add	x0, x8, #8
	bl	_mutex_lock
	ldr	x0, [x20]
	ldr	x8, [x0]
	subs	x8, x8, #1
	str	x8, [x0]
	b.eq	LBB0_5
; %bb.3:
	add	x0, x0, #8
	bl	_mutex_unlock
	b	LBB0_6
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	_hso_free_shared_int
LBB0_6:
	mov	x0, x20
	bl	_hso_free_tiomget
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hso_free_serial_device
.subsections_via_symbols
