	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_dev_state_change
_rfcomm_dev_state_change:               ## @rfcomm_dev_state_change
	.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	8(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_8
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	callq	_BT_DBG
	movl	%ebx, (%r15)
	leaq	16(%r15), %rdi
	callq	_wake_up_interruptible
	movq	(%r14), %rax
	movq	_BT_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.2:
	movl	4(%r15), %edi
	testl	%edi, %edi
	je	LBB0_3
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tty_hangup                     ## TAILCALL
LBB0_3:
	movq	_RFCOMM_RELEASE_ONHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%r14, %rdi
	callq	_rfcomm_dlc_unlock
	movl	8(%r15), %edi
	callq	_rfcomm_dev_get
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_rfcomm_dev_del
	movq	%r15, %rdi
	callq	_rfcomm_dev_put
LBB0_6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rfcomm_dlc_lock                ## TAILCALL
LBB0_8:
	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	"dlc %p dev %p err %d"

	.comm	_BT_CLOSED,8,3                  ## @BT_CLOSED
	.comm	_RFCOMM_RELEASE_ONHUP,4,2       ## @RFCOMM_RELEASE_ONHUP
	.no_dead_strip	_rfcomm_dev_state_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_dev_state_change
_rfcomm_dev_state_change:               ; @rfcomm_dev_state_change
	.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	x20, [x0, #8]
	cbz	x20, LBB0_8
; %bb.1:
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	bl	_BT_DBG
	mov	x0, x20
	str	w21, [x0], #16
	bl	_wake_up_interruptible
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _BT_CLOSED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_CLOSED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	ldr	w0, [x20, #4]
	cbz	w0, LBB0_4
; %bb.3:
	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
	b	_tty_hangup
LBB0_4:
Lloh5:
	adrp	x8, _RFCOMM_RELEASE_ONHUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RFCOMM_RELEASE_ONHUP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x20, #12
	bl	_test_bit
	cbz	x0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_rfcomm_dlc_unlock
	ldr	w0, [x20, #8]
	bl	_rfcomm_dev_get
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_rfcomm_dev_del
	mov	x0, x20
	bl	_rfcomm_dev_put
LBB0_7:
	mov	x0, x19
	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
	b	_rfcomm_dlc_lock
LBB0_8:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dlc %p dev %p err %d"

	.comm	_BT_CLOSED,8,3                  ; @BT_CLOSED
	.comm	_RFCOMM_RELEASE_ONHUP,4,2       ; @RFCOMM_RELEASE_ONHUP
	.no_dead_strip	_rfcomm_dev_state_change
.subsections_via_symbols
