	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pc300_tiocmget
_pc300_tiocmget:                        ## @pc300_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	8(%rax), %r15
	movl	(%rax), %r14d
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_CPC_TTY_DBG
	movq	%r15, %rdi
	callq	_CPC_TTY_LOCK
	movq	(%r15), %rbx
	movq	_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_M_REG
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_cpc_readb
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_CPC_TTY_UNLOCK
	movq	_CTL_DTR@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	movl	$0, %ecx
	testb	%r14b, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	movq	_CTL_RTS@GOTPCREL(%rip), %rdx
	testb	%r14b, (%rdx)
	je	LBB0_4
## %bb.3:
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	orl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-tty: tiocmget\n"

	.comm	_CTL,4,2                        ## @CTL
	.comm	_CTL_DTR,1,0                    ## @CTL_DTR
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_CTL_RTS,1,0                    ## @CTL_RTS
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.no_dead_strip	_pc300_tiocmget
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pc300_tiocmget
_pc300_tiocmget:                        ; @pc300_tiocmget
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldp	x8, x9, [x8]
	ldr	x19, [x9, #8]
	ldr	w20, [x9]
	ldr	w1, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CPC_TTY_DBG
	mov	x0, x19
	bl	_CPC_TTY_LOCK
	ldr	x21, [x19]
Lloh2:
	adrp	x8, _CTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CTL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_M_REG
	add	x0, x0, x21
	bl	_cpc_readb
	mov	x20, x0
	mov	x0, x19
	bl	_CPC_TTY_UNLOCK
Lloh5:
	adrp	x8, _CTL_DTR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTL_DTR@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh7:
	adrp	x9, _TIOCM_DTR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TIOCM_DTR@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w8, w20
	csel	w8, wzr, w9, eq
Lloh10:
	adrp	x9, _CTL_RTS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CTL_RTS@GOTPAGEOFF]
Lloh12:
	adrp	x10, _TIOCM_RTS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TIOCM_RTS@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh14:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w0, w9, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-tty: tiocmget\n"

	.comm	_CTL,4,2                        ; @CTL
	.comm	_CTL_DTR,1,0                    ; @CTL_DTR
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_CTL_RTS,1,0                    ; @CTL_RTS
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.no_dead_strip	_pc300_tiocmget
.subsections_via_symbols
