	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function disconnect_res
_disconnect_res:                        ## @disconnect_res
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%r8, %r14
	movq	%rcx, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintf
	movl	$1, %edi
	movl	%eax, %esi
	callq	_dbug
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	movl	(%r14), %esi
	decl	%esi
	movq	%rbx, %rdi
	callq	_clear_c_ind_mask_bit
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ncci_free_receive_buffers
	movq	%rbx, %rdi
	callq	_plci_remove_check
	testq	%rax, %rax
	jne	LBB0_9
## %bb.2:
	movq	(%rbx), %rax
	movq	_INC_DIS_PENDING@GOTPCREL(%rip), %rcx
	movq	_SUSPENDING@GOTPCREL(%rip), %r14
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	cmpq	(%r14), %rax
	jne	LBB0_9
LBB0_4:
	movq	%rbx, %rdi
	callq	_c_ind_mask_empty
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_7
## %bb.6:
	movq	_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_7:
	movl	8(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintf
	movl	$1, %edi
	movl	%eax, %esi
	callq	_dbug
	cmpl	$0, 8(%rbx)
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_plci_remove
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disconnect_res"

	.comm	_INC_DIS_PENDING,8,3            ## @INC_DIS_PENDING
	.comm	_SUSPENDING,8,3                 ## @SUSPENDING
	.comm	_IDLE,8,3                       ## @IDLE
L_.str.1:                               ## @.str.1
	.asciz	"chs=%d"

	.no_dead_strip	_disconnect_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function disconnect_res
_disconnect_res:                        ; @disconnect_res
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x4
	mov	x19, x3
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintf
	mov	x1, x0
	mov	w0, #1
	bl	_dbug
	cbz	x19, LBB0_8
; %bb.1:
	ldr	w8, [x20]
	sub	w1, w8, #1
	mov	x0, x19
	bl	_clear_c_ind_mask_bit
	mov	x0, x19
	mov	w1, #0
	bl	_ncci_free_receive_buffers
	mov	x0, x19
	bl	_plci_remove_check
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _INC_DIS_PENDING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _INC_DIS_PENDING@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x20, _SUSPENDING@GOTPAGE
Lloh6:
	ldr	x20, [x20, _SUSPENDING@GOTPAGEOFF]
	ldr	x10, [x20]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_c_ind_mask_empty
	cbz	x0, LBB0_8
; %bb.4:
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _IDLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IDLE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_6:
	ldr	w8, [x19, #8]
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintf
	mov	x1, x0
	mov	w0, #1
	bl	_dbug
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_plci_remove
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disconnect_res"

	.comm	_INC_DIS_PENDING,8,3            ; @INC_DIS_PENDING
	.comm	_SUSPENDING,8,3                 ; @SUSPENDING
	.comm	_IDLE,8,3                       ; @IDLE
l_.str.1:                               ; @.str.1
	.asciz	"chs=%d"

	.no_dead_strip	_disconnect_res
.subsections_via_symbols
