	.file	"extr_w6692.c_w6692_mode.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s: B%d protocol %x-->%x\n"
.LC1:
	.string	"%s: protocol %x not known\n"
	.text
	.p2align 4
	.type	w6692_mode, @function
w6692_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	r8d, r12d
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbp, QWORD PTR 24[rdi]
	mov	rbx, rdi
	mov	ecx, DWORD PTR 8[rdi]
	mov	edx, DWORD PTR 16[rdi]
	lea	rdi, .LC0[rip]
	mov	esi, DWORD PTR 4[rbp]
	call	pr_debug@PLT
	cmp	r12d, 129
	je	.L2
	cmp	r12d, 130
	je	.L3
	cmp	r12d, 128
	je	.L16
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, r12d
	lea	rdi, .LC1[rip]
	call	pr_info@PLT
	mov	eax, DWORD PTR ENOPROTOOPT[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR W_B_MODE_MMS[rip]
	mov	esi, DWORD PTR W_B_MODE[rip]
	mov	rdi, rbx
	mov	DWORD PTR [rbx], edx
	call	WriteW6692B@PLT
	mov	esi, DWORD PTR W_B_EXIM[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	WriteW6692B@PLT
	mov	esi, DWORD PTR W_B_CMDR[rip]
	mov	edx, DWORD PTR W_B_CMDR_RRST[rip]
	mov	rdi, rbx
	or	edx, DWORD PTR W_B_CMDR_RACT[rip]
	or	edx, DWORD PTR W_B_CMDR_XRST[rip]
	call	WriteW6692B@PLT
	mov	edi, DWORD PTR FLG_TRANSPARENT[rip]
	lea	rsi, 12[rbx]
	call	test_and_set_bit@PLT
.L6:
	mov	DWORD PTR 8[rbx], r12d
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR pots[rip], eax
	je	.L5
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR W_B_MODE_EPCM[rip], eax
	jne	.L17
.L5:
	mov	DWORD PTR [rbx], 0
	lea	rdi, 8[rbx]
	lea	rbp, 12[rbx]
	call	mISDN_clear_bchannel@PLT
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR W_B_MODE[rip]
	mov	rdi, rbx
	call	WriteW6692B@PLT
	mov	esi, DWORD PTR W_B_CMDR[rip]
	mov	rdi, rbx
	mov	edx, DWORD PTR W_B_CMDR_RRST[rip]
	or	edx, DWORD PTR W_B_CMDR_XRST[rip]
	call	WriteW6692B@PLT
	mov	edi, DWORD PTR FLG_HDLC[rip]
	mov	rsi, rbp
	call	test_and_clear_bit@PLT
	mov	edi, DWORD PTR FLG_TRANSPARENT[rip]
	mov	rsi, rbp
	call	test_and_clear_bit@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR W_B_MODE_ITF[rip]
	mov	esi, DWORD PTR W_B_MODE[rip]
	mov	rdi, rbx
	mov	DWORD PTR [rbx], edx
	call	WriteW6692B@PLT
	mov	esi, DWORD PTR W_B_ADM1[rip]
	mov	rdi, rbx
	mov	edx, 255
	call	WriteW6692B@PLT
	mov	esi, DWORD PTR W_B_ADM2[rip]
	mov	rdi, rbx
	mov	edx, 255
	call	WriteW6692B@PLT
	mov	esi, DWORD PTR W_B_EXIM[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	WriteW6692B@PLT
	mov	esi, DWORD PTR W_B_CMDR[rip]
	mov	rdi, rbx
	mov	edx, DWORD PTR W_B_CMDR_RRST[rip]
	or	edx, DWORD PTR W_B_CMDR_RACT[rip]
	or	edx, DWORD PTR W_B_CMDR_XRST[rip]
	call	WriteW6692B@PLT
	mov	edi, DWORD PTR FLG_HDLC[rip]
	lea	rsi, 12[rbx]
	call	test_and_set_bit@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, rbx
	call	disable_pots@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	w6692_mode, .-w6692_mode
	.comm	pots,4,4
	.comm	W_B_MODE_MMS,4,4
	.comm	W_B_MODE_ITF,4,4
	.comm	W_B_MODE_EPCM,4,4
	.comm	W_B_MODE,4,4
	.comm	W_B_EXIM,4,4
	.comm	W_B_CMDR_XRST,4,4
	.comm	W_B_CMDR_RRST,4,4
	.comm	W_B_CMDR_RACT,4,4
	.comm	W_B_CMDR,4,4
	.comm	W_B_ADM2,4,4
	.comm	W_B_ADM1,4,4
	.comm	FLG_TRANSPARENT,4,4
	.comm	FLG_HDLC,4,4
	.comm	ENOPROTOOPT,4,4
	.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_w6692.c_w6692_mode.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: B%d protocol %x-->%x\012\000"
	.align	2
.LC1:
	.ascii	"%s: protocol %x not known\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	w6692_mode, %function
w6692_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	ldr	r6, [r0, #16]
	sub	sp, sp, #8
	ldr	r3, [r0, #4]
	ldr	r2, [r0, #12]
	ldr	r1, [r6, #4]
	mov	r4, r0
	str	r5, [sp]
	ldr	r0, .L18
	bl	pr_debug
	cmp	r5, #129
	beq	.L2
	cmp	r5, #130
	beq	.L3
	cmp	r5, #128
	beq	.L16
	mov	r2, r5
	ldr	r1, [r6, #4]
	ldr	r0, .L18+4
	bl	pr_info
	ldr	r3, .L18+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r2, .L18+12
	ldr	r3, .L18+16
	ldr	r2, [r2]
	ldr	r1, [r3]
	mov	r0, r4
	str	r2, [r4]
	bl	WriteW6692B
	ldr	r3, .L18+20
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r4
	bl	WriteW6692B
	ldr	r1, .L18+24
	ldr	r3, .L18+28
	ldr	r2, .L18+32
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L18+36
	orr	r3, r3, r0
	ldr	r1, [r1]
	orr	r2, r3, r2
	mov	r0, r4
	bl	WriteW6692B
	ldr	r3, .L18+40
	add	r1, r4, #8
	ldr	r0, [r3]
	bl	test_and_set_bit
.L6:
	mov	r0, #0
	str	r5, [r4, #4]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L16:
	ldr	r3, .L18+44
	ldr	r2, [r6]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L5
	ldr	r3, .L18+48
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L17
.L5:
	mov	r3, #0
	mov	r0, r4
	str	r3, [r0], #4
	bl	mISDN_clear_bchannel
	ldr	r3, .L18+16
	ldr	r2, [r4]
	ldr	r1, [r3]
	mov	r0, r4
	bl	WriteW6692B
	ldr	r2, .L18+28
	ldr	r3, .L18+32
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L18+36
	orr	r2, r1, r2
	mov	r0, r4
	ldr	r1, [r3]
	bl	WriteW6692B
	ldr	r3, .L18+52
	add	r6, r4, #8
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_and_clear_bit
	ldr	r3, .L18+40
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_and_clear_bit
	b	.L6
.L3:
	ldr	r2, .L18+56
	ldr	r3, .L18+16
	ldr	r2, [r2]
	ldr	r1, [r3]
	mov	r0, r4
	str	r2, [r4]
	bl	WriteW6692B
	ldr	r3, .L18+60
	mov	r2, #255
	ldr	r1, [r3]
	mov	r0, r4
	bl	WriteW6692B
	ldr	r3, .L18+64
	mov	r2, #255
	ldr	r1, [r3]
	mov	r0, r4
	bl	WriteW6692B
	ldr	r3, .L18+20
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r4
	bl	WriteW6692B
	ldr	r1, .L18+24
	ldr	r3, .L18+28
	ldr	r2, .L18+32
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L18+36
	orr	r3, r3, r0
	orr	r2, r3, r2
	mov	r0, r4
	ldr	r1, [r1]
	bl	WriteW6692B
	ldr	r3, .L18+52
	add	r1, r4, #8
	ldr	r0, [r3]
	bl	test_and_set_bit
	b	.L6
.L17:
	mov	r0, r4
	bl	disable_pots
	b	.L5
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	.LC1
	.word	ENOPROTOOPT
	.word	W_B_MODE_MMS
	.word	W_B_MODE
	.word	W_B_EXIM
	.word	W_B_CMDR_RACT
	.word	W_B_CMDR_RRST
	.word	W_B_CMDR_XRST
	.word	W_B_CMDR
	.word	FLG_TRANSPARENT
	.word	pots
	.word	W_B_MODE_EPCM
	.word	FLG_HDLC
	.word	W_B_MODE_ITF
	.word	W_B_ADM1
	.word	W_B_ADM2
	.size	w6692_mode, .-w6692_mode
	.comm	pots,4,4
	.comm	W_B_MODE_MMS,4,4
	.comm	W_B_MODE_ITF,4,4
	.comm	W_B_MODE_EPCM,4,4
	.comm	W_B_MODE,4,4
	.comm	W_B_EXIM,4,4
	.comm	W_B_CMDR_XRST,4,4
	.comm	W_B_CMDR_RRST,4,4
	.comm	W_B_CMDR_RACT,4,4
	.comm	W_B_CMDR,4,4
	.comm	W_B_ADM2,4,4
	.comm	W_B_ADM1,4,4
	.comm	FLG_TRANSPARENT,4,4
	.comm	FLG_HDLC,4,4
	.comm	ENOPROTOOPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
