	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function portcomm_loweruse
_portcomm_loweruse:                     ## @portcomm_loweruse
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%rsi)
	cmpq	$1, %rax
	jg	LBB0_2
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_VERB_ALGO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%rsi), %edx
	leaq	L_.str(%rip), %rsi
	callq	_verbose
	movl	40(%rbx), %edi
	callq	_comm_point_close
	movq	32(%rbx), %r15
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	setne	%dil
	callq	_log_assert
	movl	24(%rbx), %eax
	movq	24(%r15), %rcx
	movq	(%r15), %rdx
	movq	8(%r15), %rsi
	subq	%rdx, %rsi
	movl	%eax, (%rcx,%rsi,4)
	leaq	-1(%rdx), %rax
	movq	%rax, (%r15)
	movq	16(%r15), %rax
	movq	-8(%rax,%rdx,8), %rcx
	movq	8(%rbx), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	16(%r15), %rax
	movq	(%rax,%rdx,8), %rax
	movq	%rdx, (%rax)
	movq	(%r14), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, (%r14)
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VERB_ALGO,4,2                  ## @VERB_ALGO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"close of port %d"

	.no_dead_strip	_portcomm_loweruse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function portcomm_loweruse
_portcomm_loweruse:                     ; @portcomm_loweruse
	.cfi_startproc
; %bb.0:
	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
	ldr	x8, [x1]
	subs	x8, x8, #1
	str	x8, [x1]
	b.gt	LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _VERB_ALGO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VERB_ALGO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x1, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_verbose
	ldr	w0, [x19, #40]
	bl	_comm_point_close
	ldr	x21, [x19, #32]
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, ne
	bl	_log_assert
	ldr	w8, [x19, #24]
	ldp	x10, x9, [x21]
	sub	x9, x9, x10
	ldp	x12, x11, [x21, #16]
	str	w8, [x11, x9, lsl #2]
	sub	x8, x10, #1
	ldr	x9, [x12, x8, lsl #3]
	str	x8, [x21]
	ldr	x8, [x19, #8]
	lsl	x10, x8, #3
	str	x9, [x12, x10]
	ldr	x9, [x21, #16]
	ldr	x9, [x9, x10]
	str	x8, [x9]
	ldr	x8, [x20]
	str	x8, [x19, #16]
	str	x19, [x20]
LBB0_2:
	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
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VERB_ALGO,4,2                  ; @VERB_ALGO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"close of port %d"

	.no_dead_strip	_portcomm_loweruse
.subsections_via_symbols
