	.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
	cmpq	$0, 32(%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, 24(%rbx)
	movq	%rbx, %rdi
	callq	_set_signals
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	movq	_IE0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	_IE1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_write_reg
	movq	_IE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_write_reg
	movq	_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CHRESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_write_reg                      ## 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	_IE0,4,2                        ## @IE0
	.comm	_IE1,4,2                        ## @IE1
	.comm	_IE2,4,2                        ## @IE2
	.comm	_CMD,4,2                        ## @CMD
	.comm	_CHRESET,8,3                    ## @CHRESET
	.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	x8, [x0, #32]
	cbz	x8, 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, #24]
	add	w8, w9, w8
	bic	w8, w10, w8
	str	w8, [x19, #24]
	mov	x0, x19
	bl	_set_signals
	stp	xzr, xzr, [x19, #8]
	str	xzr, [x19]
Lloh6:
	adrp	x8, _IE0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IE0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_write_reg
Lloh9:
	adrp	x8, _IE1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IE1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x19
	bl	_write_reg
Lloh12:
	adrp	x8, _IE2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IE2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	x2, [x19]
	mov	x0, x19
	bl	_write_reg
Lloh15:
	adrp	x8, _CMD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CMD@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _CHRESET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CHRESET@GOTPAGEOFF]
Lloh20:
	ldr	x2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_write_reg
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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	_IE0,4,2                        ; @IE0
	.comm	_IE1,4,2                        ; @IE1
	.comm	_IE2,4,2                        ; @IE2
	.comm	_CMD,4,2                        ; @CMD
	.comm	_CHRESET,8,3                    ; @CHRESET
	.no_dead_strip	_reset_port
.subsections_via_symbols
