	.file	"extr_t4_hw.c_t4_change_mac.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	t4_change_mac
	.type	t4_change_mac, @function
t4_change_mac:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r10d, esi
	mov	r11, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	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
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR 128[rsp]
	mov	r14, QWORD PTR 48[rsp]
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 28[rsp], eax
	test	ecx, ecx
	jns	.L2
	mov	ebp, DWORD PTR FW_VI_MAC_ADD_PERSIST_MAC[rip]
	test	r9d, r9d
	cmove	ebp, DWORD PTR FW_VI_MAC_ADD_MAC[rip]
.L2:
	lea	r8, 32[rsp]
	cmp	QWORD PTR [rsp], 0
	mov	edx, 24
	mov	r15d, DWORD PTR FW_VI_MAC_SMT_AND_MPSTCAM[rip]
	mov	rdi, r8
	cmove	r15d, DWORD PTR FW_VI_MAC_MPS_TCAM_ENTRY[rip]
	xor	esi, esi
	mov	DWORD PTR 24[rsp], r10d
	mov	QWORD PTR 8[rsp], r8
	mov	QWORD PTR 16[rsp], r11
	call	memset@PLT
	mov	edi, DWORD PTR FW_VI_MAC_CMD[rip]
	call	V_FW_CMD_OP@PLT
	mov	ebx, DWORD PTR F_FW_CMD_REQUEST[rip]
	mov	edi, r13d
	or	ebx, DWORD PTR F_FW_CMD_WRITE[rip]
	or	ebx, eax
	call	V_FW_VI_MAC_CMD_VIID@PLT
	or	ebx, eax
	mov	edi, ebx
	call	cpu_to_be32@PLT
	mov	edi, 1
	mov	QWORD PTR 32[rsp], rax
	call	V_FW_CMD_LEN16@PLT
	mov	edi, eax
	call	cpu_to_be32@PLT
	mov	edi, r15d
	mov	QWORD PTR 40[rsp], rax
	call	V_FW_VI_MAC_CMD_SMAC_RESULT@PLT
	mov	edi, ebp
	mov	r15d, DWORD PTR F_FW_VI_MAC_CMD_VALID[rip]
	mov	ebx, eax
	call	V_FW_VI_MAC_CMD_IDX@PLT
	or	ebx, eax
	mov	edi, ebx
	or	edi, r15d
	call	cpu_to_be16@PLT
	mov	r11, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR 4[r14]
	mov	edx, 4
	mov	DWORD PTR [r14], eax
	mov	rsi, r11
	call	memcpy@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	r10d, DWORD PTR 24[rsp]
	mov	rdi, r12
	mov	ecx, 24
	mov	rdx, r8
	mov	esi, r10d
	call	t4_wr_mbox@PLT
	mov	r15d, eax
	test	eax, eax
	je	.L17
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L17:
	.cfi_restore_state
	mov	edi, DWORD PTR [r14]
	call	be16_to_cpu@PLT
	mov	edi, eax
	call	G_FW_VI_MAC_CMD_IDX@PLT
	mov	r15d, eax
	cmp	eax, DWORD PTR 28[rsp]
	jnb	.L19
.L7:
	mov	rbx, QWORD PTR [rsp]
	test	rbx, rbx
	je	.L1
	cmp	QWORD PTR [r12], 0
	jne	.L20
	mov	rdi, r12
	call	chip_id@PLT
	and	r13d, DWORD PTR M_FW_VIID_VIN[rip]
	cmp	rax, QWORD PTR CHELSIO_T5[rip]
	jg	.L9
	mov	rax, QWORD PTR [rsp]
	add	r13d, r13d
	mov	DWORD PTR [rax], r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r15d, DWORD PTR ENOMEM[rip]
	neg	r15d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, QWORD PTR 32[rsp]
	call	be32_to_cpu@PLT
	mov	edi, eax
	call	G_FW_VI_MAC_CMD_SMTID@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR [rsp]
	mov	DWORD PTR [rax], r13d
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	t4_change_mac, .-t4_change_mac
	.comm	M_FW_VIID_VIN,4,4
	.comm	F_FW_VI_MAC_CMD_VALID,4,4
	.comm	F_FW_CMD_WRITE,4,4
	.comm	F_FW_CMD_REQUEST,4,4
	.comm	FW_VI_MAC_SMT_AND_MPSTCAM,4,4
	.comm	FW_VI_MAC_MPS_TCAM_ENTRY,4,4
	.comm	FW_VI_MAC_CMD,4,4
	.comm	FW_VI_MAC_ADD_PERSIST_MAC,4,4
	.comm	FW_VI_MAC_ADD_MAC,4,4
	.comm	ENOMEM,4,4
	.comm	CHELSIO_T5,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_t4_hw.c_t4_change_mac.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	t4_change_mac
	.syntax unified
	.arm
	.fpu softvfp
	.type	t4_change_mac, %function
t4_change_mac:
	@ args = 12, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	subs	fp, r3, #0
	ldr	r0, [r0, #4]
	ldr	r3, .L18
	sub	sp, sp, #44
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r3, [r0]
	mov	r10, r1
	mov	r6, r2
	ldr	r9, [sp, #80]
	ldr	r8, [sp, #88]
	ldr	r7, [sp, #32]
	str	r3, [sp, #20]
	bge	.L2
	ldr	r3, [sp, #84]
	cmp	r3, #0
	ldrne	r3, .L18+4
	ldreq	r3, .L18+8
	ldr	fp, [r3]
.L2:
	mov	r2, #0
	cmp	r8, #0
	ldrne	r3, .L18+12
	ldreq	r3, .L18+16
	ldr	r0, .L18+20
	ldr	r3, [r3]
	ldr	r0, [r0]
	str	r3, [sp, #16]
	str	r2, [sp, #24]
	str	r2, [sp, #28]
	str	r2, [sp, #32]
	bl	V_FW_CMD_OP
	mov	r2, r0
	ldr	ip, .L18+24
	ldr	r0, .L18+28
	ldr	ip, [ip]
	ldr	lr, [r0]
	mov	r0, r6
	orr	ip, ip, lr
	orr	r2, ip, r2
	str	r2, [sp, #12]
	bl	V_FW_VI_MAC_CMD_VIID
	ldr	r2, [sp, #12]
	add	r5, sp, #24
	orr	r0, r2, r0
	bl	cpu_to_be32
	mov	r2, r0
	mov	r0, #1
	str	r2, [sp, #24]
	bl	V_FW_CMD_LEN16
	bl	cpu_to_be32
	mov	r2, r0
	ldr	r3, [sp, #16]
	str	r2, [sp, #28]
	mov	r0, r3
	bl	V_FW_VI_MAC_CMD_SMAC_RESULT
	mov	r3, r0
	ldr	r2, .L18+32
	mov	r0, fp
	ldr	r2, [r2]
	mov	fp, r3
	str	r2, [sp, #12]
	bl	V_FW_VI_MAC_CMD_IDX
	ldr	r2, [sp, #12]
	orr	r0, fp, r0
	orr	r0, r0, r2
	bl	cpu_to_be16
	mov	r1, r9
	mov	r2, #4
	str	r0, [r7]
	ldr	r0, [r7, #4]
	bl	memcpy
	mov	r2, r5
	str	r5, [sp]
	mov	r1, r10
	mov	r3, #12
	mov	r0, r4
	bl	t4_wr_mbox
	subs	r5, r0, #0
	beq	.L16
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r5
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r0, [r7]
	bl	be16_to_cpu
	bl	G_FW_VI_MAC_CMD_IDX
	ldr	r3, [sp, #20]
	mov	r5, r0
	cmp	r0, r3
	ldrcs	r3, .L18+36
	ldrcs	r0, [r3]
	rsbcs	r5, r0, #0
	cmp	r8, #0
	beq	.L1
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L8
	ldr	r0, [sp, #24]
	bl	be32_to_cpu
	bl	G_FW_VI_MAC_CMD_SMTID
	str	r0, [r8]
	b	.L1
.L8:
	mov	r0, r4
	bl	chip_id
	ldr	r3, .L18+40
	ldr	r3, [r3]
	cmp	r0, r3
	ldr	r3, .L18+44
	ldr	r3, [r3]
	and	r6, r6, r3
	lslle	r6, r6, #1
	str	r6, [r8]
	b	.L1
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	FW_VI_MAC_ADD_PERSIST_MAC
	.word	FW_VI_MAC_ADD_MAC
	.word	FW_VI_MAC_SMT_AND_MPSTCAM
	.word	FW_VI_MAC_MPS_TCAM_ENTRY
	.word	FW_VI_MAC_CMD
	.word	F_FW_CMD_REQUEST
	.word	F_FW_CMD_WRITE
	.word	F_FW_VI_MAC_CMD_VALID
	.word	ENOMEM
	.word	CHELSIO_T5
	.word	M_FW_VIID_VIN
	.size	t4_change_mac, .-t4_change_mac
	.comm	M_FW_VIID_VIN,4,4
	.comm	F_FW_VI_MAC_CMD_VALID,4,4
	.comm	F_FW_CMD_WRITE,4,4
	.comm	F_FW_CMD_REQUEST,4,4
	.comm	FW_VI_MAC_SMT_AND_MPSTCAM,4,4
	.comm	FW_VI_MAC_MPS_TCAM_ENTRY,4,4
	.comm	FW_VI_MAC_CMD,4,4
	.comm	FW_VI_MAC_ADD_PERSIST_MAC,4,4
	.comm	FW_VI_MAC_ADD_MAC,4,4
	.comm	ENOMEM,4,4
	.comm	CHELSIO_T5,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
