	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_port
_reset_port:                            ## @reset_port
	.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
	cmpl	$0, 4(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	callq	_tx_stop
	movq	%rbx, %rdi
	callq	_rx_stop
	movq	_SerialSignal_DTR@GOTPCREL(%rip), %rax
	movq	_SerialSignal_RTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%rbx)
	movq	%rbx, %rdi
	callq	_set_signals
	movq	_IRQ_ALL@GOTPCREL(%rip), %rax
	movq	_IRQ_MASTER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_slgt_irq_off                   ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SerialSignal_DTR,4,2           ## @SerialSignal_DTR
	.comm	_SerialSignal_RTS,4,2           ## @SerialSignal_RTS
	.comm	_IRQ_ALL,4,2                    ## @IRQ_ALL
	.comm	_IRQ_MASTER,4,2                 ## @IRQ_MASTER
	.no_dead_strip	_reset_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_port
_reset_port:                            ; @reset_port
	.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
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_tx_stop
	mov	x0, x19
	bl	_rx_stop
Lloh0:
	adrp	x8, _SerialSignal_DTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SerialSignal_DTR@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SerialSignal_RTS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SerialSignal_RTS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x19]
	add	w8, w9, w8
	bic	w8, w10, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_set_signals
Lloh6:
	adrp	x8, _IRQ_ALL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_ALL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _IRQ_MASTER@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IRQ_MASTER@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_slgt_irq_off
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SerialSignal_DTR,4,2           ; @SerialSignal_DTR
	.comm	_SerialSignal_RTS,4,2           ; @SerialSignal_RTS
	.comm	_IRQ_ALL,4,2                    ; @IRQ_ALL
	.comm	_IRQ_MASTER,4,2                 ; @IRQ_MASTER
	.no_dead_strip	_reset_port
.subsections_via_symbols
