	.file	"extr_e1000_hw.c_e1000_check_polarity.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	e1000_check_polarity, @function
e1000_check_polarity:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	cmp	rax, QWORD PTR e1000_phy_m88[rip]
	je	.L15
	cmp	rax, QWORD PTR e1000_phy_igp[rip]
	je	.L16
.L6:
	mov	rax, QWORD PTR E1000_SUCCESS[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L17
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	esi, DWORD PTR M88E1000_PHY_SPEC_STATUS[rip]
	lea	rdx, 20[rsp]
	call	e1000_read_phy_reg@PLT
	test	rax, rax
	jne	.L1
	mov	ecx, DWORD PTR M88E1000_PSSR_REV_POLARITY_SHIFT[rip]
	mov	eax, DWORD PTR 20[rsp]
	and	eax, DWORD PTR M88E1000_PSSR_REV_POLARITY[rip]
	sar	eax, cl
	test	eax, eax
	mov	eax, DWORD PTR e1000_rev_polarity_reversed[rip]
	cmove	eax, DWORD PTR e1000_rev_polarity_normal[rip]
	mov	DWORD PTR [rbx], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	lea	r12, 20[rsp]
	mov	esi, DWORD PTR IGP01E1000_PHY_PORT_STATUS[rip]
	mov	QWORD PTR 8[rsp], rdi
	mov	rdx, r12
	call	e1000_read_phy_reg@PLT
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR 20[rsp]
	mov	edx, DWORD PTR IGP01E1000_PSSR_SPEED_MASK[rip]
	mov	rdi, QWORD PTR 8[rsp]
	and	edx, eax
	cmp	edx, DWORD PTR IGP01E1000_PSSR_SPEED_1000MBPS[rip]
	je	.L18
	test	DWORD PTR IGP01E1000_PSSR_POLARITY_REVERSED[rip], eax
	mov	eax, DWORD PTR e1000_rev_polarity_reversed[rip]
	cmove	eax, DWORD PTR e1000_rev_polarity_normal[rip]
	mov	DWORD PTR [rbx], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR IGP01E1000_PHY_PCS_INIT_REG[rip]
	mov	rdx, r12
	call	e1000_read_phy_reg@PLT
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR 20[rsp]
	test	DWORD PTR IGP01E1000_PHY_POLARITY_MASK[rip], eax
	mov	eax, DWORD PTR e1000_rev_polarity_reversed[rip]
	cmove	eax, DWORD PTR e1000_rev_polarity_normal[rip]
	mov	DWORD PTR [rbx], eax
	jmp	.L6
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	e1000_check_polarity, .-e1000_check_polarity
	.comm	e1000_rev_polarity_reversed,4,4
	.comm	e1000_rev_polarity_normal,4,4
	.comm	e1000_phy_m88,8,8
	.comm	e1000_phy_igp,8,8
	.comm	M88E1000_PSSR_REV_POLARITY_SHIFT,4,4
	.comm	M88E1000_PSSR_REV_POLARITY,4,4
	.comm	M88E1000_PHY_SPEC_STATUS,4,4
	.comm	IGP01E1000_PSSR_SPEED_MASK,4,4
	.comm	IGP01E1000_PSSR_SPEED_1000MBPS,4,4
	.comm	IGP01E1000_PSSR_POLARITY_REVERSED,4,4
	.comm	IGP01E1000_PHY_PORT_STATUS,4,4
	.comm	IGP01E1000_PHY_POLARITY_MASK,4,4
	.comm	IGP01E1000_PHY_PCS_INIT_REG,4,4
	.comm	E1000_SUCCESS,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_e1000_hw.c_e1000_check_polarity.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	e1000_check_polarity, %function
e1000_check_polarity:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r2, .L20
	ldr	r3, [r0]
	ldr	r2, [r2]
	sub	sp, sp, #12
	cmp	r3, r2
	ldr	r2, .L20+4
	mov	r5, r1
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	beq	.L16
	ldr	r2, .L20+8
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L17
.L6:
	ldr	r3, .L20+12
	ldr	r0, [r3]
.L1:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L16:
	ldr	r3, .L20+16
	mov	r2, sp
	ldr	r1, [r3]
	bl	e1000_read_phy_reg
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L20+20
	ldr	r2, .L20+24
	ldr	r1, [r3]
	ldr	r3, [sp]
	ldr	r2, [r2]
	and	r3, r3, r1
	asrs	r3, r3, r2
	beq	.L10
.L14:
	ldr	r3, .L20+28
	ldr	r3, [r3]
.L11:
	str	r3, [r5]
	b	.L6
.L17:
	ldr	r3, .L20+32
	mov	r2, sp
	ldr	r1, [r3]
	mov	r4, r0
	bl	e1000_read_phy_reg
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L20+36
	ldr	r1, .L20+40
	ldr	r3, [r3]
	ldr	r2, [sp]
	ldr	r1, [r1]
	and	r3, r3, r2
	cmp	r3, r1
	beq	.L19
	ldr	r3, .L20+44
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L14
.L10:
	ldr	r3, .L20+48
	ldr	r3, [r3]
	b	.L11
.L19:
	ldr	r3, .L20+52
	mov	r2, sp
	mov	r0, r4
	ldr	r1, [r3]
	bl	e1000_read_phy_reg
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L20+56
	ldr	r2, [sp]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L10
	b	.L14
.L18:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	e1000_phy_m88
	.word	.LC0
	.word	e1000_phy_igp
	.word	E1000_SUCCESS
	.word	M88E1000_PHY_SPEC_STATUS
	.word	M88E1000_PSSR_REV_POLARITY
	.word	M88E1000_PSSR_REV_POLARITY_SHIFT
	.word	e1000_rev_polarity_reversed
	.word	IGP01E1000_PHY_PORT_STATUS
	.word	IGP01E1000_PSSR_SPEED_MASK
	.word	IGP01E1000_PSSR_SPEED_1000MBPS
	.word	IGP01E1000_PSSR_POLARITY_REVERSED
	.word	e1000_rev_polarity_normal
	.word	IGP01E1000_PHY_PCS_INIT_REG
	.word	IGP01E1000_PHY_POLARITY_MASK
	.size	e1000_check_polarity, .-e1000_check_polarity
	.comm	e1000_rev_polarity_reversed,4,4
	.comm	e1000_rev_polarity_normal,4,4
	.comm	e1000_phy_m88,4,4
	.comm	e1000_phy_igp,4,4
	.comm	M88E1000_PSSR_REV_POLARITY_SHIFT,4,4
	.comm	M88E1000_PSSR_REV_POLARITY,4,4
	.comm	M88E1000_PHY_SPEC_STATUS,4,4
	.comm	IGP01E1000_PSSR_SPEED_MASK,4,4
	.comm	IGP01E1000_PSSR_SPEED_1000MBPS,4,4
	.comm	IGP01E1000_PSSR_POLARITY_REVERSED,4,4
	.comm	IGP01E1000_PHY_PORT_STATUS,4,4
	.comm	IGP01E1000_PHY_POLARITY_MASK,4,4
	.comm	IGP01E1000_PHY_PCS_INIT_REG,4,4
	.comm	E1000_SUCCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
