	.file	"extr_r8185b_init.c_HwThreeWire.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"HwThreeWire(): CmdReg: %#X RE|WE bits are not clear!!\n"
	.align 8
.LC1:
	.string	"HwThreeWire(): nDataBufBitCnt(%d) should be multiple of 8!!!\n"
	.align 8
.LC2:
	.string	"HwThreeWire(): nDataBufBitCnt(%d) should <= 64!!!\n"
	.text
	.p2align 4
	.globl	HwThreeWire
	.type	HwThreeWire, @function
HwThreeWire:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xor	ebx, ebx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR TC_3W_POLL_MAX_TRY_CNT[rip]
	mov	DWORD PTR 4[rsp], ecx
	test	rax, rax
	jg	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, 10
	add	rbx, 1
	call	udelay@PLT
	mov	rax, QWORD PTR TC_3W_POLL_MAX_TRY_CNT[rip]
	cmp	rax, rbx
	jle	.L2
.L4:
	mov	rsi, QWORD PTR SW_3W_CMD1[rip]
	mov	rdi, r12
	call	read_nic_byte@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR SW_3W_CMD1_RE[rip]
	or	rax, QWORD PTR SW_3W_CMD1_WE[rip]
	test	rax, rbp
	jne	.L3
	mov	rax, QWORD PTR TC_3W_POLL_MAX_TRY_CNT[rip]
.L2:
	cmp	rbx, rax
	je	.L51
	cmp	r13, 16
	je	.L52
.L6:
	cmp	r13, 64
	je	.L53
	test	r13, r13
	lea	rdx, 7[r13]
	cmovns	rdx, r13
	sar	rdx, 3
	test	r13b, 7
	jne	.L54
	cmp	r13, 64
	jg	.L55
.L10:
	lea	ebx, -1[rdx]
	xor	ebp, ebp
	test	edx, edx
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rsi, QWORD PTR SW_3W_DB0[rip]
	mov	rdx, QWORD PTR [r14+rbp*8]
	mov	rdi, r12
	add	rsi, rbp
	call	write_nic_byte@PLT
	mov	rax, rbp
	add	rbp, 1
	cmp	rax, rbx
	jne	.L12
.L7:
	mov	eax, DWORD PTR 4[rsp]
	lea	rdx, -1[r13]
	test	eax, eax
	je	.L14
	or	rdx, QWORD PTR SW_3W_CMD0_HOLD[rip]
.L14:
	mov	rsi, QWORD PTR SW_3W_CMD0[rip]
	mov	rdi, r12
	call	write_nic_byte@PLT
	test	r15d, r15d
	je	.L15
	mov	rdx, QWORD PTR SW_3W_CMD1_WE[rip]
	mov	rsi, QWORD PTR SW_3W_CMD1[rip]
	mov	rdi, r12
	call	write_nic_byte@PLT
.L18:
	mov	rax, QWORD PTR TC_3W_POLL_MAX_TRY_CNT[rip]
	xor	ebx, ebx
	test	rax, rax
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rsi, QWORD PTR SW_3W_CMD1[rip]
	mov	rdi, r12
	call	read_nic_byte@PLT
	mov	rdx, QWORD PTR SW_3W_CMD1_RE[rip]
	or	rdx, QWORD PTR SW_3W_CMD1_WE[rip]
	test	rdx, rax
	jne	.L19
	test	QWORD PTR SW_3W_CMD1_DONE[rip], rax
	jne	.L56
.L19:
	mov	edi, 10
	add	rbx, 1
	call	udelay@PLT
	mov	rax, QWORD PTR TC_3W_POLL_MAX_TRY_CNT[rip]
	cmp	rax, rbx
	jg	.L16
.L17:
	cmp	rax, rbx
	je	.L57
.L20:
	test	r15d, r15d
	jne	.L22
	cmp	r13, 16
	je	.L58
	cmp	r13, 64
	je	.L59
	test	r13, r13
	lea	rbx, 7[r13]
	cmovns	rbx, r13
	sar	rbx, 3
	test	r13b, 7
	jne	.L60
.L25:
	cmp	r13, 64
	jg	.L61
.L26:
	test	ebx, ebx
	jle	.L22
	lea	ebp, -1[rbx]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rsi, QWORD PTR SW_3W_DB0[rip]
	mov	rdi, r12
	add	rsi, rbx
	call	read_nic_byte@PLT
	mov	QWORD PTR [r14+rbx*8], rax
	mov	rax, rbx
	add	rbx, 1
	cmp	rbp, rax
	jne	.L28
.L22:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdx, QWORD PTR SW_3W_CMD1_RE[rip]
	mov	rsi, QWORD PTR SW_3W_CMD1[rip]
	mov	rdi, r12
	call	write_nic_byte@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L55:
	mov	rsi, r13
	lea	rdi, .LC2[rip]
	mov	QWORD PTR 8[rsp], rdx
	call	panic@PLT
	mov	rdx, QWORD PTR 8[rsp]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L54:
	mov	rsi, r13
	lea	rdi, .LC1[rip]
	mov	QWORD PTR 8[rsp], rdx
	call	panic@PLT
	mov	rdx, QWORD PTR 8[rsp]
	cmp	r13, 64
	jle	.L10
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L56:
	mov	rax, QWORD PTR TC_3W_POLL_MAX_TRY_CNT[rip]
	cmp	rax, rbx
	jne	.L20
.L57:
	mov	rsi, QWORD PTR SW_3W_CMD1[rip]
	xor	edx, edx
	mov	rdi, r12
	call	write_nic_byte@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L51:
	mov	rsi, rbp
	lea	rdi, .LC0[rip]
	call	panic@PLT
	cmp	r13, 16
	jne	.L6
.L52:
	mov	edx, DWORD PTR [r14]
	mov	rsi, QWORD PTR SW_3W_DB0[rip]
	mov	rdi, r12
	call	write_nic_word@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L53:
	mov	edx, DWORD PTR [r14]
	mov	rsi, QWORD PTR SW_3W_DB0[rip]
	mov	rdi, r12
	call	write_nic_dword@PLT
	mov	edx, DWORD PTR 32[r14]
	mov	rsi, QWORD PTR SW_3W_DB1[rip]
	mov	rdi, r12
	call	write_nic_dword@PLT
	jmp	.L7
.L61:
	mov	rsi, r13
	lea	rdi, .LC2[rip]
	call	panic@PLT
	jmp	.L26
.L60:
	mov	rsi, r13
	lea	rdi, .LC1[rip]
	call	panic@PLT
	jmp	.L25
.L58:
	mov	rsi, QWORD PTR SW_3W_DB0[rip]
	mov	rdi, r12
	call	read_nic_word@PLT
	mov	DWORD PTR [r14], eax
	jmp	.L22
.L59:
	mov	rsi, QWORD PTR SW_3W_DB0[rip]
	mov	rdi, r12
	call	read_nic_dword@PLT
	mov	rsi, QWORD PTR SW_3W_DB1[rip]
	mov	rdi, r12
	mov	DWORD PTR [r14], eax
	call	read_nic_dword@PLT
	mov	DWORD PTR 32[r14], eax
	jmp	.L22
	.cfi_endproc
.LFE0:
	.size	HwThreeWire, .-HwThreeWire
	.comm	TC_3W_POLL_MAX_TRY_CNT,8,8
	.comm	SW_3W_DB1,8,8
	.comm	SW_3W_DB0,8,8
	.comm	SW_3W_CMD1_WE,8,8
	.comm	SW_3W_CMD1_RE,8,8
	.comm	SW_3W_CMD1_DONE,8,8
	.comm	SW_3W_CMD1,8,8
	.comm	SW_3W_CMD0_HOLD,8,8
	.comm	SW_3W_CMD0,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_r8185b_init.c_HwThreeWire.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"HwThreeWire(): CmdReg: %#X RE|WE bits are not clear"
	.ascii	"!!\012\000"
	.align	2
.LC1:
	.ascii	"HwThreeWire(): nDataBufBitCnt(%d) should be multipl"
	.ascii	"e of 8!!!\012\000"
	.align	2
.LC2:
	.ascii	"HwThreeWire(): nDataBufBitCnt(%d) should <= 64!!!\012"
	.ascii	"\000"
	.text
	.align	2
	.global	HwThreeWire
	.syntax unified
	.arm
	.fpu softvfp
	.type	HwThreeWire, %function
HwThreeWire:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, .L61
	mov	r5, r0
	ldr	r0, [r6]
	sub	sp, sp, #20
	cmp	r0, #0
	mov	fp, #0
	ldr	r9, .L61+4
	ldr	r10, [sp, #56]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp, #12]
	ble	.L2
	ldr	r8, .L61+8
	ldr	r7, .L61+12
	b	.L4
.L3:
	mov	r0, #10
	bl	udelay
	ldr	r0, [r6]
	add	fp, fp, #1
	cmp	r0, fp
	ble	.L2
.L4:
	mov	r0, r5
	ldr	r1, [r9]
	bl	read_nic_byte
	ldr	r3, [r8]
	ldr	r2, [r7]
	mov	r4, r0
	orr	r3, r3, r2
	tst	r3, r0
	bne	.L3
	ldr	r0, [r6]
.L2:
	cmp	r0, fp
	beq	.L50
.L5:
	ldr	r3, [sp, #4]
	cmp	r3, #16
	beq	.L51
	ldr	r3, [sp, #4]
	cmp	r3, #64
	beq	.L52
	ldr	r3, [sp, #4]
	cmp	r3, #0
	add	r8, r3, #7
	movge	r8, r3
	tst	r3, #7
	asr	r8, r8, #3
	bne	.L53
	ldr	r3, [sp, #4]
	cmp	r3, #64
	bgt	.L54
.L10:
	ldr	r3, [sp, #4]
	cmp	r3, #7
	ble	.L7
.L11:
	mov	r4, #0
	ldr	r3, [sp, #8]
	ldr	fp, .L61+16
	sub	r7, r3, #4
.L12:
	ldr	r1, [fp]
	mov	r0, r5
	add	r1, r4, r1
	ldr	r2, [r7, #4]!
	add	r4, r4, #1
	bl	write_nic_byte
	cmp	r8, r4
	bgt	.L12
.L7:
	ldr	r3, [sp, #12]
	mov	r0, r5
	cmp	r3, #0
	ldr	r3, [sp, #4]
	sub	r2, r3, #1
	ldrne	r3, .L61+20
	ldrne	r3, [r3]
	orrne	r2, r2, r3
	ldr	r3, .L61+24
	ldr	r1, [r3]
	bl	write_nic_byte
	cmp	r10, #0
	beq	.L15
	ldr	r7, .L61+12
	mov	r0, r5
	ldr	r1, [r9]
	ldr	r2, [r7]
	bl	write_nic_byte
.L18:
	ldr	r3, [r6]
	mov	r4, #0
	cmp	r3, #0
	ble	.L17
	ldr	r8, .L61+8
	ldr	r7, .L61+12
	ldr	fp, .L61+28
.L16:
	mov	r0, r5
	ldr	r1, [r9]
	bl	read_nic_byte
	ldr	r3, [r8]
	ldr	r2, [r7]
	orr	r3, r3, r2
	tst	r3, r0
	bne	.L19
	ldr	r3, [fp]
	tst	r0, r3
	bne	.L55
.L19:
	mov	r0, #10
	bl	udelay
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L16
.L17:
	cmp	r4, r3
	beq	.L56
.L20:
	cmp	r10, #0
	bne	.L22
	ldr	r3, [sp, #4]
	cmp	r3, #16
	beq	.L57
	ldr	r3, [sp, #4]
	cmp	r3, #64
	beq	.L58
	ldr	r3, [sp, #4]
	cmp	r3, #0
	add	r6, r3, #7
	movge	r6, r3
	tst	r3, #7
	asr	r6, r6, #3
	bne	.L59
.L25:
	ldr	r3, [sp, #4]
	cmp	r3, #64
	bgt	.L60
	ldr	r3, [sp, #4]
	cmp	r3, #7
	ble	.L22
.L27:
	ldr	r3, [sp, #8]
	ldr	fp, .L61+16
	sub	r4, r3, #4
.L29:
	ldr	r1, [fp]
	mov	r0, r5
	add	r1, r10, r1
	bl	read_nic_byte
	add	r10, r10, #1
	cmp	r6, r10
	str	r0, [r4, #4]!
	bgt	.L29
.L22:
	mov	r0, #1
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L54:
	mov	r1, r3
	ldr	r0, .L61+32
	bl	panic
	b	.L11
.L53:
	mov	r1, r3
	ldr	r0, .L61+36
	bl	panic
	ldr	r3, [sp, #4]
	cmp	r3, #64
	ble	.L10
	b	.L54
.L15:
	ldr	r8, .L61+8
	mov	r0, r5
	ldr	r1, [r9]
	ldr	r2, [r8]
	bl	write_nic_byte
	b	.L18
.L55:
	ldr	r3, [r6]
	cmp	r4, r3
	bne	.L20
.L56:
	mov	r2, #0
	mov	r0, r5
	ldr	r1, [r9]
	bl	write_nic_byte
	b	.L20
.L51:
	ldr	fp, .L61+16
	ldr	r3, [sp, #8]
	mov	r0, r5
	ldr	r2, [r3]
	ldr	r1, [fp]
	bl	write_nic_word
	b	.L7
.L50:
	mov	r1, r4
	ldr	r0, .L61+40
	bl	panic
	b	.L5
.L52:
	ldr	r4, [sp, #8]
	ldr	fp, .L61+16
	ldr	r2, [r4]
	ldr	r1, [fp]
	mov	r0, r5
	bl	write_nic_dword
	ldr	r3, .L61+44
	mov	r0, r5
	ldr	r2, [r4, #16]
	ldr	r1, [r3]
	bl	write_nic_dword
	b	.L7
.L60:
	mov	r1, r3
	ldr	r0, .L61+32
	bl	panic
	b	.L27
.L59:
	mov	r1, r3
	ldr	r0, .L61+36
	bl	panic
	b	.L25
.L57:
	ldr	r3, .L61+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	read_nic_word
	ldr	r3, [sp, #8]
	str	r0, [r3]
	mov	r0, #1
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L58:
	ldr	r3, .L61+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	read_nic_dword
	ldr	r4, [sp, #8]
	ldr	r3, .L61+44
	str	r0, [r4]
	ldr	r1, [r3]
	mov	r0, r5
	bl	read_nic_dword
	str	r0, [r4, #16]
	b	.L22
.L62:
	.align	2
.L61:
	.word	TC_3W_POLL_MAX_TRY_CNT
	.word	SW_3W_CMD1
	.word	SW_3W_CMD1_RE
	.word	SW_3W_CMD1_WE
	.word	SW_3W_DB0
	.word	SW_3W_CMD0_HOLD
	.word	SW_3W_CMD0
	.word	SW_3W_CMD1_DONE
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.word	SW_3W_DB1
	.size	HwThreeWire, .-HwThreeWire
	.comm	TC_3W_POLL_MAX_TRY_CNT,4,4
	.comm	SW_3W_DB1,4,4
	.comm	SW_3W_DB0,4,4
	.comm	SW_3W_CMD1_WE,4,4
	.comm	SW_3W_CMD1_RE,4,4
	.comm	SW_3W_CMD1_DONE,4,4
	.comm	SW_3W_CMD1,4,4
	.comm	SW_3W_CMD0_HOLD,4,4
	.comm	SW_3W_CMD0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
