	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function disconnect_b3_res
_disconnect_b3_res:                     ## @disconnect_b3_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movl	%edi, %r14d
	movl	%edi, %eax
	sarl	$16, %eax
	movslq	%eax, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_dprintf
	movl	$1, %edi
	movl	%eax, %esi
	callq	_dbug
	xorl	%eax, %eax
	cmpl	$65536, %r14d                   ## imm = 0x10000
	jb	LBB0_30
## %bb.1:
	testq	%r15, %r15
	je	LBB0_30
## %bb.2:
	movl	$0, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%r15)
	movl	4(%r15), %ecx
	movq	_B3_T90NL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_8
## %bb.3:
	movq	_B3_ISO8208@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_8
## %bb.4:
	movq	_B3_X25_DCE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_8
## %bb.5:
	movq	8(%r15), %rax
	movq	_B2_LAPD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_8
## %bb.6:
	movq	_B2_LAPD_FREE_SAPI_SEL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_8
## %bb.7:
	movq	_CALL_DIR_FORCE_OUTG_NL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 56(%r15)
LBB0_8:
	movq	_MAX_CHANNELS_PER_PLCI@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.9:
	movq	16(%r15), %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rdx,%rdi,8)
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rdi
	cmpq	%rdi, %rsi
	jne	LBB0_10
LBB0_12:
	movq	_MANUFACTURER_FEATURE_FAX_PAPER_FORMATS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%eax, %eax
	testl	%edx, (%r12)
	je	LBB0_30
## %bb.13:
	andl	$-2, %ecx
	cmpl	$4, %ecx
	jne	LBB0_30
## %bb.14:
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movq	_INC_DIS_PENDING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_29
## %bb.15:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ncci_free_receive_buffers
	movq	_N_EDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_nl_req_ncci
	movq	_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	32(%r15), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	_fax_disconnect_command@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_start_internal_command
	movl	$1, %eax
	jmp	LBB0_30
LBB0_16:
	movq	48(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.17:
	decq	%rcx
	movq	%rcx, 48(%r15)
LBB0_18:
	decq	%rsi
	cmpq	%rsi, %rdi
	jae	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rdx,%rdi,8), %rcx
	movq	%rcx, (%rdx,%rdi,8)
	leaq	1(%rdi), %rcx
	movq	(%rax), %rsi
	decq	%rsi
	movq	%rcx, %rdi
	cmpq	%rsi, %rcx
	jb	LBB0_19
LBB0_20:
	movq	$0, (%rdx,%rsi,8)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ncci_free_receive_buffers
	movq	24(%r15), %rax
	movq	_IDLE@GOTPCREL(%rip), %rbx
	movq	_SUSPENDING@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rbx), %rax
	je	LBB0_24
## %bb.21:
	cmpq	%rcx, %rax
	jne	LBB0_29
LBB0_24:
	cmpq	$0, 48(%r15)
	jne	LBB0_29
## %bb.26:
	cmpq	%rcx, %rax
	jne	LBB0_28
## %bb.27:
	movl	40(%r15), %edi
	movq	__FACILITY_I@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r14w, %r14d
	leaq	l_.str.2(%rip), %rax
	movq	%rax, (%rsp)
	leaq	L_.str.1(%rip), %r8
	movl	$3, %r9d
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	callq	_sendf
	movl	40(%r15), %edi
	movq	__DISCONNECT_I@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %r8
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	callq	_sendf
LBB0_28:
	movq	%r15, %rdi
	callq	_plci_remove
	movq	(%rbx), %rax
	movq	%rax, 24(%r15)
LBB0_29:
	xorl	%eax, %eax
LBB0_30:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disconnect_b3_res(ncci=0x%x"

	.comm	_B3_T90NL,4,2                   ## @B3_T90NL
	.comm	_B3_ISO8208,4,2                 ## @B3_ISO8208
	.comm	_B3_X25_DCE,4,2                 ## @B3_X25_DCE
	.comm	_B2_LAPD,8,3                    ## @B2_LAPD
	.comm	_B2_LAPD_FREE_SAPI_SEL,8,3      ## @B2_LAPD_FREE_SAPI_SEL
	.comm	_CALL_DIR_FORCE_OUTG_NL,4,2     ## @CALL_DIR_FORCE_OUTG_NL
	.comm	_MAX_CHANNELS_PER_PLCI,8,3      ## @MAX_CHANNELS_PER_PLCI
	.comm	_IDLE,8,3                       ## @IDLE
	.comm	_SUSPENDING,8,3                 ## @SUSPENDING
	.comm	__FACILITY_I,4,2                ## @_FACILITY_I
L_.str.1:                               ## @.str.1
	.asciz	"ws"

	.section	__TEXT,__const
l_.str.2:                               ## @.str.2
	.asciz	"\003\004\000\000"

	.comm	__DISCONNECT_I,4,2              ## @_DISCONNECT_I
	.section	__TEXT,__cstring,cstring_literals
L_.str.3:                               ## @.str.3
	.asciz	"w"

	.comm	_MANUFACTURER_FEATURE_FAX_PAPER_FORMATS,4,2 ## @MANUFACTURER_FEATURE_FAX_PAPER_FORMATS
	.comm	_INC_DIS_PENDING,8,3            ## @INC_DIS_PENDING
	.comm	_N_EDATA,4,2                    ## @N_EDATA
	.comm	_fax_disconnect_command,4,2     ## @fax_disconnect_command
	.no_dead_strip	_disconnect_b3_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function disconnect_b3_res
_disconnect_b3_res:                     ; @disconnect_b3_res
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x0
	sbfx	x21, x20, #16, #16
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_dprintf
	mov	x1, x0
	mov	w0, #1
	bl	_dbug
	mov	x0, #0
	cmp	w20, #16, lsl #12               ; =65536
	b.lo	LBB0_19
; %bb.1:
	cbz	x19, LBB0_19
; %bb.2:
	str	wzr, [x19]
	stp	xzr, xzr, [x19, #64]
	ldr	w8, [x19, #4]
Lloh2:
	adrp	x9, _B3_T90NL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _B3_T90NL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _B3_ISO8208@GOTPAGE
Lloh6:
	ldr	x10, [x10, _B3_ISO8208@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x11, _B3_X25_DCE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _B3_X25_DCE@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	b.eq	LBB0_5
; %bb.3:
	ldr	x9, [x19, #8]
Lloh11:
	adrp	x10, _B2_LAPD@GOTPAGE
Lloh12:
	ldr	x10, [x10, _B2_LAPD@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
Lloh14:
	adrp	x11, _B2_LAPD_FREE_SAPI_SEL@GOTPAGE
Lloh15:
	ldr	x11, [x11, _B2_LAPD_FREE_SAPI_SEL@GOTPAGEOFF]
Lloh16:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.eq	LBB0_5
; %bb.4:
Lloh17:
	adrp	x9, _CALL_DIR_FORCE_OUTG_NL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CALL_DIR_FORCE_OUTG_NL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	ldr	w10, [x19, #56]
	orr	w9, w10, w9
	str	w9, [x19, #56]
LBB0_5:
Lloh20:
	adrp	x10, _MAX_CHANNELS_PER_PLCI@GOTPAGE
Lloh21:
	ldr	x10, [x10, _MAX_CHANNELS_PER_PLCI@GOTPAGEOFF]
	ldr	x12, [x10]
	cbz	x12, LBB0_9
; %bb.6:
	mov	x11, #0
	ldr	x9, [x19, #16]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x9, x11, lsl #3]
	cmp	x13, x21
	b.eq	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x11, x11, #1
	cmp	x12, x11
	b.ne	LBB0_7
LBB0_9:
Lloh22:
	adrp	x9, _MANUFACTURER_FEATURE_FAX_PAPER_FORMATS@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MANUFACTURER_FEATURE_FAX_PAPER_FORMATS@GOTPAGEOFF]
	ldr	w10, [x22]
Lloh24:
	ldr	w9, [x9]
	and	w9, w9, w10
	and	w8, w8, #0xfffffffe
	cmp	w9, #0
	ccmp	w8, #4, #0, ne
	b.ne	LBB0_18
; %bb.10:
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x21, lsl #3]
Lloh25:
	adrp	x9, _INC_DIS_PENDING@GOTPAGE
Lloh26:
	ldr	x9, [x9, _INC_DIS_PENDING@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.11:
	mov	x0, x19
	mov	x1, x21
	bl	_ncci_free_receive_buffers
Lloh28:
	adrp	x8, _N_EDATA@GOTPAGE
Lloh29:
	ldr	x8, [x8, _N_EDATA@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_nl_req_ncci
Lloh31:
	adrp	x8, _IDLE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IDLE@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldr	x9, [x19, #32]
	ldr	x9, [x9]
	str	x8, [x9, x21, lsl #3]
Lloh34:
	adrp	x8, _fax_disconnect_command@GOTPAGE
Lloh35:
	ldr	x8, [x8, _fax_disconnect_command@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_start_internal_command
	mov	w0, #1
	b	LBB0_19
LBB0_12:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_14
; %bb.13:
	sub	x8, x8, #1
	str	x8, [x19, #48]
LBB0_14:
	sub	x8, x12, #1
	cmp	x11, x8
	b.hs	LBB0_16
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x9, x11, lsl #3
	add	x12, x11, #1
	ldr	x11, [x8, #8]
	str	x11, [x8]
	ldr	x8, [x10]
	sub	x8, x8, #1
	mov	x11, x12
	cmp	x12, x8
	b.lo	LBB0_15
LBB0_16:
	str	xzr, [x9, x8, lsl #3]
	mov	x0, x19
	mov	x1, x21
	bl	_ncci_free_receive_buffers
	mov	x0, #0
	ldr	x8, [x19, #24]
Lloh37:
	adrp	x21, _IDLE@GOTPAGE
Lloh38:
	ldr	x21, [x21, _IDLE@GOTPAGEOFF]
	ldr	x10, [x21]
Lloh39:
	adrp	x9, _SUSPENDING@GOTPAGE
Lloh40:
	ldr	x9, [x9, _SUSPENDING@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_19
; %bb.17:
	ldr	x10, [x19, #48]
	cbz	x10, LBB0_20
LBB0_18:
	mov	x0, #0
LBB0_19:
	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
	add	sp, sp, #64
	ret
LBB0_20:
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.21:
	ldr	w0, [x19, #40]
Lloh42:
	adrp	x8, __FACILITY_I@GOTPAGE
Lloh43:
	ldr	x8, [x8, __FACILITY_I@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	and	w20, w20, #0xffff
Lloh45:
	adrp	x8, l_.str.2@PAGE
Lloh46:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [sp]
Lloh47:
	adrp	x4, l_.str.1@PAGE
Lloh48:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	w3, #0
	mov	w5, #3
	bl	_sendf
	ldr	w0, [x19, #40]
Lloh49:
	adrp	x8, __DISCONNECT_I@GOTPAGE
Lloh50:
	ldr	x8, [x8, __DISCONNECT_I@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
Lloh52:
	adrp	x4, l_.str.3@PAGE
Lloh53:
	add	x4, x4, l_.str.3@PAGEOFF
	mov	x2, x20
	mov	w3, #0
	mov	x5, #0
	bl	_sendf
LBB0_22:
	mov	x0, x19
	bl	_plci_remove
	mov	x0, #0
	ldr	x8, [x21]
	str	x8, [x19, #24]
	b	LBB0_19
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disconnect_b3_res(ncci=0x%x"

	.comm	_B3_T90NL,4,2                   ; @B3_T90NL
	.comm	_B3_ISO8208,4,2                 ; @B3_ISO8208
	.comm	_B3_X25_DCE,4,2                 ; @B3_X25_DCE
	.comm	_B2_LAPD,8,3                    ; @B2_LAPD
	.comm	_B2_LAPD_FREE_SAPI_SEL,8,3      ; @B2_LAPD_FREE_SAPI_SEL
	.comm	_CALL_DIR_FORCE_OUTG_NL,4,2     ; @CALL_DIR_FORCE_OUTG_NL
	.comm	_MAX_CHANNELS_PER_PLCI,8,3      ; @MAX_CHANNELS_PER_PLCI
	.comm	_IDLE,8,3                       ; @IDLE
	.comm	_SUSPENDING,8,3                 ; @SUSPENDING
	.comm	__FACILITY_I,4,2                ; @_FACILITY_I
l_.str.1:                               ; @.str.1
	.asciz	"ws"

	.section	__TEXT,__const
l_.str.2:                               ; @.str.2
	.asciz	"\003\004\000\000"

	.comm	__DISCONNECT_I,4,2              ; @_DISCONNECT_I
	.section	__TEXT,__cstring,cstring_literals
l_.str.3:                               ; @.str.3
	.asciz	"w"

	.comm	_MANUFACTURER_FEATURE_FAX_PAPER_FORMATS,4,2 ; @MANUFACTURER_FEATURE_FAX_PAPER_FORMATS
	.comm	_INC_DIS_PENDING,8,3            ; @INC_DIS_PENDING
	.comm	_N_EDATA,4,2                    ; @N_EDATA
	.comm	_fax_disconnect_command,4,2     ; @fax_disconnect_command
	.no_dead_strip	_disconnect_b3_res
.subsections_via_symbols
