	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moxa_tiocmset
_moxa_tiocmset:                         ## @moxa_tiocmset
	.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
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rdi, %rbx
	movq	_moxa_openlock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_MoxaPortGetLineOut
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r15d, %eax
	je	LBB0_4
## %bb.3:
	movl	$1, -28(%rbp)
LBB0_4:
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%r15d, %ecx
	je	LBB0_6
## %bb.5:
	movl	$1, -32(%rbp)
LBB0_6:
	testl	%r14d, %eax
	je	LBB0_8
## %bb.7:
	movl	$0, -28(%rbp)
LBB0_8:
	testl	%r14d, %ecx
	je	LBB0_9
## %bb.10:
	movl	$0, -32(%rbp)
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_1:
	movq	_moxa_openlock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_9:
	movl	-32(%rbp), %esi
LBB0_11:
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_MoxaPortLineCtrl
	movq	_moxa_openlock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_moxa_openlock,4,2              ## @moxa_openlock
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.no_dead_strip	_moxa_tiocmset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moxa_tiocmset
_moxa_tiocmset:                         ; @moxa_tiocmset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
Lloh0:
	adrp	x0, _moxa_openlock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _moxa_openlock@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x19, [x19, #8]
	cbz	x19, LBB0_9
; %bb.1:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_MoxaPortGetLineOut
Lloh2:
	adrp	x8, _TIOCM_RTS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TIOCM_RTS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.2:
	mov	w9, #1
	str	w9, [sp, #8]
LBB0_3:
Lloh5:
	adrp	x9, _TIOCM_DTR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TIOCM_DTR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_5
; %bb.4:
	mov	w10, #1
	str	w10, [sp, #12]
LBB0_5:
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
	str	wzr, [sp, #8]
LBB0_7:
	tst	w9, w20
	b.eq	LBB0_10
; %bb.8:
	mov	w1, #0
	str	wzr, [sp, #12]
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x0, _moxa_openlock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _moxa_openlock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
	ldr	w1, [sp, #12]
LBB0_11:
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_MoxaPortLineCtrl
Lloh13:
	adrp	x0, _moxa_openlock@GOTPAGE
Lloh14:
	ldr	x0, [x0, _moxa_openlock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_moxa_openlock,4,2              ; @moxa_openlock
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.no_dead_strip	_moxa_tiocmset
.subsections_via_symbols
