	.file	"extr_message.c_disconnect_b3_res.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"disconnect_b3_res(ncci=0x%x"
.LC1:
	.string	"ws"
	.section	.rodata
.LC2:
	.string	"\003\004"
	.string	""
	.string	""
	.section	.rodata.str1.1
.LC3:
	.string	"w"
	.text
	.p2align 4
	.type	disconnect_b3_res, @function
disconnect_b3_res:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	lea	rdi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sar	ebp, 16
	mov	rbx, rdx
	movsx	rbp, ebp
	mov	rsi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	dprintf@PLT
	mov	edi, 1
	mov	esi, eax
	call	dbug@PLT
	test	r13, r13
	je	.L30
	test	rbp, rbp
	je	.L30
	mov	esi, DWORD PTR 4[r13]
	cmp	esi, DWORD PTR B3_T90NL[rip]
	mov	QWORD PTR 72[r13], 0
	mov	QWORD PTR 64[r13], 0
	mov	DWORD PTR 0[r13], 0
	je	.L5
	cmp	esi, DWORD PTR B3_ISO8208[rip]
	je	.L5
	cmp	esi, DWORD PTR B3_X25_DCE[rip]
	je	.L5
	mov	rax, QWORD PTR 8[r13]
	cmp	rax, QWORD PTR B2_LAPD[rip]
	je	.L5
	cmp	rax, QWORD PTR B2_LAPD_FREE_SAPI_SEL[rip]
	je	.L5
	mov	eax, DWORD PTR CALL_DIR_FORCE_OUTG_NL[rip]
	or	DWORD PTR 56[r13], eax
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, QWORD PTR MAX_CHANNELS_PER_PLCI[rip]
	test	rdx, rdx
	je	.L6
	mov	rcx, QWORD PTR 16[r13]
	xor	eax, eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	add	rax, 1
	cmp	rax, rdx
	je	.L6
.L7:
	cmp	QWORD PTR [rcx+rax*8], rbp
	jne	.L8
	mov	rsi, QWORD PTR 48[r13]
	test	rsi, rsi
	je	.L29
	sub	rsi, 1
	mov	QWORD PTR 48[r13], rsi
	lea	rsi, -1[rdx]
	cmp	rax, rsi
	jnb	.L32
	.p2align 4,,10
	.p2align 3
.L11:
	add	rax, 1
	mov	rdx, QWORD PTR [rcx+rax*8]
	mov	QWORD PTR -8[rcx+rax*8], rdx
	mov	rdx, QWORD PTR MAX_CHANNELS_PER_PLCI[rip]
.L29:
	lea	rsi, -1[rdx]
	cmp	rax, rsi
	jb	.L11
.L32:
	mov	QWORD PTR -8[rcx+rdx*8], 0
	mov	rsi, rbp
	mov	rdi, r13
	call	ncci_free_receive_buffers@PLT
	mov	rax, QWORD PTR 24[r13]
	cmp	rax, QWORD PTR IDLE[rip]
	je	.L12
	cmp	rax, QWORD PTR SUSPENDING[rip]
	jne	.L30
	cmp	QWORD PTR 48[r13], 0
	je	.L19
	.p2align 4,,10
	.p2align 3
.L30:
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR MANUFACTURER_FEATURE_FAX_PAPER_FORMATS[rip], eax
	je	.L30
	sub	esi, 4
	cmp	esi, 1
	ja	.L30
	mov	rax, QWORD PTR 8[rbx]
	mov	rbx, QWORD PTR INC_DIS_PENDING[rip]
	cmp	QWORD PTR [rax+rbp*8], rbx
	jne	.L30
	mov	rsi, rbp
	mov	rdi, r13
	call	ncci_free_receive_buffers@PLT
	mov	esi, DWORD PTR N_EDATA[rip]
	mov	rdx, rbp
	mov	rdi, r13
	call	nl_req_ncci@PLT
	mov	rax, QWORD PTR 32[r13]
	mov	rsi, r13
	mov	edi, r12d
	mov	rdx, QWORD PTR IDLE[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rax+rbp*8], rdx
	mov	edx, DWORD PTR fax_disconnect_command[rip]
	call	start_internal_command@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	QWORD PTR 48[r13], 0
	jne	.L30
	cmp	rax, QWORD PTR SUSPENDING[rip]
	je	.L19
.L15:
	mov	rdi, r13
	call	plci_remove@PLT
	mov	rax, QWORD PTR IDLE[rip]
	mov	QWORD PTR 24[r13], rax
	jmp	.L30
.L19:
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edi, DWORD PTR 40[r13]
	mov	esi, DWORD PTR _FACILITY_I[rip]
	xor	ecx, ecx
	lea	rax, .LC2[rip]
	movzx	r12d, r12w
	mov	r9d, 3
	push	rax
	.cfi_def_cfa_offset 64
	lea	r8, .LC1[rip]
	mov	edx, r12d
	xor	eax, eax
	call	sendf@PLT
	mov	edi, DWORD PTR 40[r13]
	mov	edx, r12d
	xor	r9d, r9d
	mov	esi, DWORD PTR _DISCONNECT_I[rip]
	lea	r8, .LC3[rip]
	xor	ecx, ecx
	xor	eax, eax
	call	sendf@PLT
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	disconnect_b3_res, .-disconnect_b3_res
	.comm	fax_disconnect_command,4,4
	.comm	_FACILITY_I,4,4
	.comm	_DISCONNECT_I,4,4
	.comm	SUSPENDING,8,8
	.comm	N_EDATA,4,4
	.comm	MAX_CHANNELS_PER_PLCI,8,8
	.comm	MANUFACTURER_FEATURE_FAX_PAPER_FORMATS,4,4
	.comm	INC_DIS_PENDING,8,8
	.comm	IDLE,8,8
	.comm	CALL_DIR_FORCE_OUTG_NL,4,4
	.comm	B3_X25_DCE,4,4
	.comm	B3_T90NL,4,4
	.comm	B3_ISO8208,4,4
	.comm	B2_LAPD_FREE_SAPI_SEL,8,8
	.comm	B2_LAPD,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_message.c_disconnect_b3_res.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"disconnect_b3_res(ncci=0x%x\000"
	.align	2
.LC2:
	.ascii	"ws\000"
	.align	2
.LC3:
	.ascii	"w\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	disconnect_b3_res, %function
disconnect_b3_res:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	asr	r6, r0, #16
	mov	r1, r6
	sub	sp, sp, #20
	mov	r7, r0
	ldr	r0, .L30
	mov	r5, r3
	mov	r8, r2
	bl	dprintf
	mov	r1, r0
	mov	r0, #1
	bl	dbug
	cmp	r5, #0
	cmpne	r6, #0
	beq	.L13
	mov	r3, #0
	ldr	r1, .L30+4
	ldr	r2, [r5, #4]
	ldr	r1, [r1]
	str	r3, [r5, #40]
	cmp	r2, r1
	str	r3, [r5, #36]
	str	r3, [r5]
	beq	.L4
	ldr	r3, .L30+8
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L4
	ldr	r3, .L30+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L4
	ldr	r1, .L30+16
	ldr	r3, [r5, #8]
	ldr	r1, [r1]
	cmp	r3, r1
	beq	.L4
	ldr	r1, .L30+20
	ldr	r1, [r1]
	cmp	r3, r1
	ldrne	r1, .L30+24
	ldrne	r3, [r5, #32]
	ldrne	r1, [r1]
	orrne	r3, r3, r1
	strne	r3, [r5, #32]
.L4:
	ldr	r0, .L30+28
	ldr	ip, [r0]
	cmp	ip, #0
	beq	.L5
	ldr	r9, [r5, #12]
	mov	r1, #0
	sub	lr, r9, #4
	b	.L6
.L7:
	add	r1, r1, #1
	cmp	r1, ip
	beq	.L5
.L6:
	ldr	r4, [lr, #4]!
	cmp	r6, r4
	bne	.L7
	ldr	r3, [r5, #28]
	cmp	r3, #0
	subne	r3, r3, #1
	strne	r3, [r5, #28]
	sub	r3, ip, #1
	cmp	r1, r3
	bcs	.L9
	add	r3, r9, r1, lsl #2
.L10:
	ldr	r2, [r3, #4]
	add	r1, r1, #1
	str	r2, [r3], #4
	ldr	ip, [r0]
	sub	r2, ip, #1
	cmp	r1, r2
	bcc	.L10
.L9:
	mov	r3, #0
	sub	ip, ip, #-1073741823
	ldr	r4, .L30+32
	str	r3, [r9, ip, lsl #2]
	mov	r1, r6
	mov	r0, r5
	bl	ncci_free_receive_buffers
	ldr	r2, [r4]
	ldr	r3, [r5, #16]
	cmp	r3, r2
	beq	.L11
	ldr	r2, .L30+36
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L13
	ldr	r3, [r5, #28]
	cmp	r3, #0
	beq	.L18
.L13:
	mov	r0, #0
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L5:
	ldr	r3, .L30+40
	ldr	r1, [r8]
	ldr	r3, [r3]
	tst	r1, r3
	beq	.L13
	sub	r2, r2, #4
	cmp	r2, #1
	bhi	.L13
	ldr	r2, [r8, #4]
	ldr	r3, .L30+44
	ldr	r2, [r2, r6, lsl #2]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L13
	mov	r1, r6
	mov	r0, r5
	bl	ncci_free_receive_buffers
	ldr	r3, .L30+48
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r5
	bl	nl_req_ncci
	ldr	r3, [r5, #20]
	ldr	r2, .L30+32
	mov	r0, r7
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L30+52
	str	r1, [r2, r6, lsl #2]
	mov	r1, r5
	ldr	r2, [r3]
	bl	start_internal_command
	mov	r0, #1
	b	.L1
.L11:
	ldr	r2, [r5, #28]
	cmp	r2, #0
	bne	.L13
	ldr	r2, .L30+36
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L18
.L14:
	mov	r0, r5
	bl	plci_remove
	ldr	r3, [r4]
	mov	r0, #0
	str	r3, [r5, #16]
	b	.L1
.L18:
	mov	ip, #3
	ldr	r0, .L30+56
	ldr	r3, .L30+60
	ldr	r1, .L30+64
	str	ip, [sp, #4]
	lsl	r7, r7, #16
	ldr	r1, [r1]
	lsr	r7, r7, #16
	str	r3, [sp]
	str	r0, [sp, #8]
	mov	r2, r7
	mov	r3, #0
	ldr	r0, [r5, #24]
	bl	sendf
	mov	r3, #0
	ldr	r0, .L30+68
	ldr	r1, .L30+72
	str	r3, [sp, #4]
	ldr	r1, [r1]
	str	r0, [sp]
	mov	r2, r7
	ldr	r0, [r5, #24]
	bl	sendf
	b	.L14
.L31:
	.align	2
.L30:
	.word	.LC0
	.word	B3_T90NL
	.word	B3_ISO8208
	.word	B3_X25_DCE
	.word	B2_LAPD
	.word	B2_LAPD_FREE_SAPI_SEL
	.word	CALL_DIR_FORCE_OUTG_NL
	.word	MAX_CHANNELS_PER_PLCI
	.word	IDLE
	.word	SUSPENDING
	.word	MANUFACTURER_FEATURE_FAX_PAPER_FORMATS
	.word	INC_DIS_PENDING
	.word	N_EDATA
	.word	fax_disconnect_command
	.word	.LANCHOR0
	.word	.LC2
	.word	_FACILITY_I
	.word	.LC3
	.word	_DISCONNECT_I
	.size	disconnect_b3_res, .-disconnect_b3_res
	.comm	fax_disconnect_command,4,4
	.comm	_FACILITY_I,4,4
	.comm	_DISCONNECT_I,4,4
	.comm	SUSPENDING,4,4
	.comm	N_EDATA,4,4
	.comm	MAX_CHANNELS_PER_PLCI,4,4
	.comm	MANUFACTURER_FEATURE_FAX_PAPER_FORMATS,4,4
	.comm	INC_DIS_PENDING,4,4
	.comm	IDLE,4,4
	.comm	CALL_DIR_FORCE_OUTG_NL,4,4
	.comm	B3_X25_DCE,4,4
	.comm	B3_T90NL,4,4
	.comm	B3_ISO8208,4,4
	.comm	B2_LAPD_FREE_SAPI_SEL,4,4
	.comm	B2_LAPD,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC1:
	.ascii	"\003\004\000\000\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
