	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxser_tiocmget
_mxser_tiocmget:                        ## @mxser_tiocmget
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_MXSER_PORTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movb	(%r15), %r13b
	leaq	4(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_UART_MSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	callq	_inb
	movl	%eax, %r14d
	movq	_UART_MSR_ANY_DELTA@GOTPCREL(%rip), %rax
	testb	%r14b, (%rax)
	je	LBB0_7
## %bb.6:
	movzbl	%r14b, %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mxser_check_modem_status
LBB0_7:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_UART_MCR_RTS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	$0, %edx
	testb	%r13b, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_9:
	movq	_UART_MCR_DTR@GOTPCREL(%rip), %rsi
	movl	$0, %eax
	testb	%r13b, (%rsi)
	je	LBB0_11
## %bb.10:
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	movq	_UART_MSR_DCD@GOTPCREL(%rip), %rdi
	movl	$0, %esi
	testb	%r14b, (%rdi)
	je	LBB0_13
## %bb.12:
	movq	_TIOCM_CAR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_13:
	orl	%edx, %eax
	movq	_UART_MSR_RI@GOTPCREL(%rip), %rdi
	movl	$0, %edx
	testb	%r14b, (%rdi)
	je	LBB0_15
## %bb.14:
	movq	_TIOCM_RNG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_15:
	orl	%esi, %eax
	movq	_UART_MSR_DSR@GOTPCREL(%rip), %rdi
	movl	$0, %esi
	testb	%r14b, (%rdi)
	je	LBB0_17
## %bb.16:
	movq	_TIOCM_DSR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_17:
	orl	%esi, %edx
	orl	%edx, %eax
	movq	_UART_MSR_CTS@GOTPCREL(%rip), %rdx
	testb	%r14b, (%rdx)
	je	LBB0_19
## %bb.18:
	movq	_TIOCM_CTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_19:
	orl	%ecx, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MXSER_PORTS,8,3                ## @MXSER_PORTS
	.comm	_ENOIOCTLCMD,4,2                ## @ENOIOCTLCMD
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_UART_MSR,8,3                   ## @UART_MSR
	.comm	_UART_MSR_ANY_DELTA,1,0         ## @UART_MSR_ANY_DELTA
	.comm	_UART_MCR_RTS,1,0               ## @UART_MCR_RTS
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.comm	_UART_MCR_DTR,1,0               ## @UART_MCR_DTR
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_UART_MSR_DCD,1,0               ## @UART_MSR_DCD
	.comm	_TIOCM_CAR,4,2                  ## @TIOCM_CAR
	.comm	_UART_MSR_RI,1,0                ## @UART_MSR_RI
	.comm	_TIOCM_RNG,4,2                  ## @TIOCM_RNG
	.comm	_UART_MSR_DSR,1,0               ## @UART_MSR_DSR
	.comm	_TIOCM_DSR,4,2                  ## @TIOCM_DSR
	.comm	_UART_MSR_CTS,1,0               ## @UART_MSR_CTS
	.comm	_TIOCM_CTS,4,2                  ## @TIOCM_CTS
	.no_dead_strip	_mxser_tiocmget
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxser_tiocmget
_mxser_tiocmget:                        ; @mxser_tiocmget
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MXSER_PORTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MXSER_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x20, x0
	ldr	x21, [x0, #16]
Lloh5:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldrb	w23, [x21]
	add	x22, x21, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x21, #8]
Lloh10:
	adrp	x9, _UART_MSR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _UART_MSR@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inb
	mov	x19, x0
Lloh13:
	adrp	x8, _UART_MSR_ANY_DELTA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _UART_MSR_ANY_DELTA@GOTPAGEOFF]
	ldrb	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_mxser_check_modem_status
LBB0_8:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
Lloh15:
	adrp	x8, _UART_MCR_RTS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UART_MCR_RTS@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh17:
	adrp	x9, _TIOCM_RTS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TIOCM_RTS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w8, w23
	csel	w8, wzr, w9, eq
Lloh20:
	adrp	x9, _UART_MCR_DTR@GOTPAGE
Lloh21:
	ldr	x9, [x9, _UART_MCR_DTR@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh22:
	adrp	x10, _TIOCM_DTR@GOTPAGE
Lloh23:
	ldr	x10, [x10, _TIOCM_DTR@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	tst	w9, w23
	csel	w9, wzr, w10, eq
	orr	w8, w9, w8
Lloh25:
	adrp	x9, _UART_MSR_DCD@GOTPAGE
Lloh26:
	ldr	x9, [x9, _UART_MSR_DCD@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh27:
	adrp	x10, _TIOCM_CAR@GOTPAGE
Lloh28:
	ldr	x10, [x10, _TIOCM_CAR@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	tst	w9, w19
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _UART_MSR_RI@GOTPAGE
Lloh31:
	ldr	x9, [x9, _UART_MSR_RI@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh32:
	adrp	x10, _TIOCM_RNG@GOTPAGE
Lloh33:
	ldr	x10, [x10, _TIOCM_RNG@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	tst	w9, w19
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh35:
	adrp	x9, _UART_MSR_DSR@GOTPAGE
Lloh36:
	ldr	x9, [x9, _UART_MSR_DSR@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh37:
	adrp	x10, _TIOCM_DSR@GOTPAGE
Lloh38:
	ldr	x10, [x10, _TIOCM_DSR@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	tst	w9, w19
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh40:
	adrp	x9, _UART_MSR_CTS@GOTPAGE
Lloh41:
	ldr	x9, [x9, _UART_MSR_CTS@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh42:
	adrp	x10, _TIOCM_CTS@GOTPAGE
Lloh43:
	ldr	x10, [x10, _TIOCM_CTS@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
	tst	w9, w19
	csel	w9, wzr, w10, eq
	orr	w0, w8, w9
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MXSER_PORTS,8,3                ; @MXSER_PORTS
	.comm	_ENOIOCTLCMD,4,2                ; @ENOIOCTLCMD
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_UART_MSR,8,3                   ; @UART_MSR
	.comm	_UART_MSR_ANY_DELTA,1,0         ; @UART_MSR_ANY_DELTA
	.comm	_UART_MCR_RTS,1,0               ; @UART_MCR_RTS
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.comm	_UART_MCR_DTR,1,0               ; @UART_MCR_DTR
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_UART_MSR_DCD,1,0               ; @UART_MSR_DCD
	.comm	_TIOCM_CAR,4,2                  ; @TIOCM_CAR
	.comm	_UART_MSR_RI,1,0                ; @UART_MSR_RI
	.comm	_TIOCM_RNG,4,2                  ; @TIOCM_RNG
	.comm	_UART_MSR_DSR,1,0               ; @UART_MSR_DSR
	.comm	_TIOCM_DSR,4,2                  ; @TIOCM_DSR
	.comm	_UART_MSR_CTS,1,0               ; @UART_MSR_CTS
	.comm	_TIOCM_CTS,4,2                  ; @TIOCM_CTS
	.no_dead_strip	_mxser_tiocmget
.subsections_via_symbols
