	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tx_done
_tx_done:                               ## @tx_done
	.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
	cmpl	$0, (%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	$0, (%rdi)
	movq	64(%rdi), %rax
	movq	_MGSL_MODE_ASYNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	%rsi, %r14
	leaq	32(%rbx), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rbx)
	movq	$0, 56(%rbx)
	callq	_del_timer
	cmpl	$0, 8(%rbx)
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_get_signals
	movl	12(%rbx), %eax
	movq	_SerialSignal_RTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_5
## %bb.4:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_set_signals
LBB0_5:
	movl	$0, 8(%rbx)
LBB0_6:
	cmpq	$0, 8(%r14)
	jne	LBB0_10
## %bb.7:
	cmpq	$0, (%r14)
	je	LBB0_8
LBB0_10:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tx_stop                        ## TAILCALL
LBB0_8:
	movq	_BH_TRANSMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MGSL_MODE_ASYNC,8,3            ## @MGSL_MODE_ASYNC
	.comm	_SerialSignal_RTS,4,2           ## @SerialSignal_RTS
	.comm	_BH_TRANSMIT,4,2                ## @BH_TRANSMIT
	.no_dead_strip	_tx_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tx_done
_tx_done:                               ; @tx_done
	.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]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
	str	xzr, [x0]
	ldr	x8, [x0, #64]
Lloh0:
	adrp	x9, _MGSL_MODE_ASYNC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MGSL_MODE_ASYNC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x20, x1
	add	x0, x19, #32
	stp	xzr, xzr, [x19, #40]
	str	xzr, [x19, #56]
	bl	_del_timer
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_get_signals
	ldr	w8, [x19, #12]
Lloh3:
	adrp	x9, _SerialSignal_RTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SerialSignal_RTS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	bic	w8, w8, w9
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_set_signals
LBB0_6:
	str	wzr, [x19, #8]
LBB0_7:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_9
; %bb.8:
	ldr	x8, [x20]
	cbz	x8, LBB0_10
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tx_stop
LBB0_10:
Lloh6:
	adrp	x8, _BH_TRANSMIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BH_TRANSMIT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MGSL_MODE_ASYNC,8,3            ; @MGSL_MODE_ASYNC
	.comm	_SerialSignal_RTS,4,2           ; @SerialSignal_RTS
	.comm	_BH_TRANSMIT,4,2                ; @BH_TRANSMIT
	.no_dead_strip	_tx_done
.subsections_via_symbols
