	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_dev_modem_status
_rfcomm_dev_modem_status:               ## @rfcomm_dev_modem_status
	.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), %r14
	testq	%r14, %r14
	je	LBB0_11
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %rsi
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_BT_DBG
	movq	_TIOCM_CD@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.2:
	movq	_RFCOMM_V24_DV@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
LBB0_6:
	movq	_RFCOMM_V24_RTC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TIOCM_DSR@GOTPCREL(%rip), %rcx
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	andl	%ebx, %eax
	testl	%eax, %eax
	cmovel	%eax, %edx
	movq	_RFCOMM_V24_RTR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rsi
	movq	_TIOCM_CTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rsi), %eax
	andl	%ebx, %ecx
	testl	%ecx, %ecx
	cmovel	%ecx, %eax
	orl	%edx, %eax
	movq	_RFCOMM_V24_IC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	je	LBB0_8
## %bb.7:
	movq	_TIOCM_RI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_8:
	orl	%ecx, %eax
	movq	_RFCOMM_V24_DV@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	je	LBB0_10
## %bb.9:
	movl	(%r15), %ebx
LBB0_10:
	orl	%ebx, %eax
	movl	%eax, (%r14)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.4:
	callq	_C_CLOCAL
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	8(%r14), %rdi
	callq	_tty_hangup
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dlc %p dev %p v24_sig 0x%02x"

	.comm	_TIOCM_CD,4,2                   ## @TIOCM_CD
	.comm	_RFCOMM_V24_DV,4,2              ## @RFCOMM_V24_DV
	.comm	_RFCOMM_V24_RTC,4,2             ## @RFCOMM_V24_RTC
	.comm	_TIOCM_DSR,4,2                  ## @TIOCM_DSR
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_RFCOMM_V24_RTR,4,2             ## @RFCOMM_V24_RTR
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.comm	_TIOCM_CTS,4,2                  ## @TIOCM_CTS
	.comm	_RFCOMM_V24_IC,4,2              ## @RFCOMM_V24_IC
	.comm	_TIOCM_RI,4,2                   ## @TIOCM_RI
	.no_dead_strip	_rfcomm_dev_modem_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_dev_modem_status
_rfcomm_dev_modem_status:               ; @rfcomm_dev_modem_status
	.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	x19, [x0]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_BT_DBG
	ldr	w8, [x19]
Lloh2:
	adrp	x21, _TIOCM_CD@GOTPAGE
Lloh3:
	ldr	x21, [x21, _TIOCM_CD@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh4:
	adrp	x22, _RFCOMM_V24_DV@GOTPAGE
Lloh5:
	ldr	x22, [x22, _RFCOMM_V24_DV@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x22]
	tst	w8, w20
	b.eq	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _RFCOMM_V24_RTC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RFCOMM_V24_RTC@GOTPAGEOFF]
Lloh8:
	adrp	x9, _TIOCM_DSR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TIOCM_DSR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _TIOCM_DTR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TIOCM_DTR@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w8, w20
	csel	w8, wzr, w9, eq
Lloh15:
	adrp	x9, _RFCOMM_V24_RTR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _RFCOMM_V24_RTR@GOTPAGEOFF]
Lloh17:
	adrp	x10, _TIOCM_RTS@GOTPAGE
Lloh18:
	ldr	x10, [x10, _TIOCM_RTS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	ldr	w10, [x10]
Lloh21:
	adrp	x11, _TIOCM_CTS@GOTPAGE
Lloh22:
	ldr	x11, [x11, _TIOCM_CTS@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _RFCOMM_V24_IC@GOTPAGE
Lloh25:
	ldr	x9, [x9, _RFCOMM_V24_IC@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _TIOCM_RI@GOTPAGE
Lloh28:
	ldr	x10, [x10, _TIOCM_RI@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
	ldr	w9, [x22]
	ldr	w10, [x21]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_4:
	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
LBB0_5:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.6:
	bl	_C_CLOCAL
	cbnz	w0, LBB0_3
; %bb.7:
	ldr	x0, [x19, #8]
	bl	_tty_hangup
	b	LBB0_3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dlc %p dev %p v24_sig 0x%02x"

	.comm	_TIOCM_CD,4,2                   ; @TIOCM_CD
	.comm	_RFCOMM_V24_DV,4,2              ; @RFCOMM_V24_DV
	.comm	_RFCOMM_V24_RTC,4,2             ; @RFCOMM_V24_RTC
	.comm	_TIOCM_DSR,4,2                  ; @TIOCM_DSR
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_RFCOMM_V24_RTR,4,2             ; @RFCOMM_V24_RTR
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.comm	_TIOCM_CTS,4,2                  ; @TIOCM_CTS
	.comm	_RFCOMM_V24_IC,4,2              ; @RFCOMM_V24_IC
	.comm	_TIOCM_RI,4,2                   ; @TIOCM_RI
	.no_dead_strip	_rfcomm_dev_modem_status
.subsections_via_symbols
