	.file	"extr_fw.c_mlx4_INIT_PORT.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mlx4_INIT_PORT
	.type	mlx4_INIT_PORT, @function
mlx4_INIT_PORT:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR MLX4_FLAG_OLD_PORT_CMDS[rip], eax
	je	.L2
	call	mlx4_alloc_cmd_mailbox@PLT
	mov	rdi, rax
	mov	r13, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR 8[rbp]
	movsx	rbx, r12d
	mov	r14, QWORD PTR 0[r13]
	xor	edx, edx
	mov	esi, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, r14
	mov	eax, DWORD PTR [rax+rbx*4]
	sal	esi, 4
	movzx	esi, sil
	sal	eax, 8
	and	eax, 3840
	or	esi, eax
	call	MLX4_PUT@PLT
	mov	rax, QWORD PTR 24[rbp]
	mov	esi, 128
	mov	rdi, r14
	mov	edx, 4
	mov	ecx, DWORD PTR [rax+rbx*4]
	sal	esi, cl
	call	MLX4_PUT@PLT
	mov	rax, QWORD PTR 32[rbp]
	mov	edx, 6
	mov	rdi, r14
	mov	esi, DWORD PTR [rax+rbx*4]
	call	MLX4_PUT@PLT
	mov	rax, QWORD PTR 40[rbp]
	mov	edx, 10
	mov	rdi, r14
	mov	esi, DWORD PTR [rax+rbx*4]
	call	MLX4_PUT@PLT
	mov	eax, DWORD PTR MLX4_CMD_NATIVE[rip]
	xor	ecx, ecx
	mov	edx, r12d
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, rbp
	mov	r9d, DWORD PTR MLX4_CMD_TIME_CLASS_A[rip]
	push	rax
	.cfi_def_cfa_offset 64
	mov	r8d, DWORD PTR MLX4_CMD_INIT_PORT[rip]
	call	mlx4_cmd@PLT
	mov	rsi, r13
	mov	rdi, rbp
	mov	r12d, eax
	call	mlx4_free_cmd_mailbox@PLT
	pop	rcx
	.cfi_def_cfa_offset 56
	pop	rsi
	.cfi_def_cfa_offset 48
	test	r12d, r12d
	jne	.L1
.L9:
	mov	rdi, rbp
	call	mlx4_hca_core_clock_update@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR MLX4_CMD_WRAPPED[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, esi
	xor	ecx, ecx
	mov	r9d, DWORD PTR MLX4_CMD_TIME_CLASS_A[rip]
	mov	r8d, DWORD PTR MLX4_CMD_INIT_PORT[rip]
	xor	esi, esi
	push	rax
	.cfi_def_cfa_offset 64
	call	mlx4_cmd@PLT
	mov	r12d, eax
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	test	r12d, r12d
	je	.L9
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	rdi, r13
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	PTR_ERR@PLT
	.cfi_endproc
.LFE0:
	.size	mlx4_INIT_PORT, .-mlx4_INIT_PORT
	.comm	MLX4_FLAG_OLD_PORT_CMDS,4,4
	.comm	MLX4_CMD_WRAPPED,4,4
	.comm	MLX4_CMD_TIME_CLASS_A,4,4
	.comm	MLX4_CMD_NATIVE,4,4
	.comm	MLX4_CMD_INIT_PORT,4,4
	.comm	INIT_PORT_VL_SHIFT,4,4
	.comm	INIT_PORT_PORT_WIDTH_SHIFT,4,4
	.comm	INIT_PORT_MTU_OFFSET,4,4
	.comm	INIT_PORT_MAX_PKEY_OFFSET,4,4
	.comm	INIT_PORT_MAX_GID_OFFSET,4,4
	.comm	INIT_PORT_FLAGS_OFFSET,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_fw.c_mlx4_INIT_PORT.c"
	.text
	.align	2
	.global	mlx4_INIT_PORT
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_INIT_PORT, %function
mlx4_INIT_PORT:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r2, .L10
	ldr	r3, [r0]
	ldr	r2, [r2]
	mov	r4, r0
	ands	r3, r3, r2
	mov	r5, r1
	sub	sp, sp, #16
	beq	.L2
	bl	mlx4_alloc_cmd_mailbox
	mov	r6, r0
	bl	IS_ERR
	subs	r7, r0, #0
	bne	.L8
	ldmib	r4, {r2, r3}
	ldr	r1, [r2, r5, lsl #2]
	ldr	r3, [r3, r5, lsl #2]
	ldr	r8, [r6]
	lsl	r1, r1, #4
	lsl	r3, r3, #8
	and	r3, r3, #3840
	and	r1, r1, #255
	orr	r1, r1, r3
	mov	r2, r7
	mov	r0, r8
	bl	MLX4_PUT
	mov	r1, #128
	ldr	r3, [r4, #12]
	mov	r2, #4
	ldr	r3, [r3, r5, lsl #2]
	mov	r0, r8
	lsl	r1, r1, r3
	bl	MLX4_PUT
	ldr	r3, [r4, #16]
	mov	r2, #6
	ldr	r1, [r3, r5, lsl #2]
	mov	r0, r8
	bl	MLX4_PUT
	ldr	r3, [r4, #20]
	mov	r2, #10
	ldr	r1, [r3, r5, lsl #2]
	mov	r0, r8
	bl	MLX4_PUT
	ldr	r1, .L10+4
	ldr	r2, .L10+8
	ldr	r3, .L10+12
	ldr	lr, [r1]
	ldr	ip, [r2]
	ldr	r0, [r3]
	mov	r2, r5
	ldr	r1, [r6, #4]
	mov	r3, r7
	stm	sp, {r0, ip, lr}
	mov	r0, r4
	bl	mlx4_cmd
	mov	r5, r0
	mov	r1, r6
	mov	r0, r4
	bl	mlx4_free_cmd_mailbox
	cmp	r5, #0
	bne	.L1
.L9:
	mov	r0, r4
	bl	mlx4_hca_core_clock_update
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	ip, .L10+16
	ldr	r1, .L10+8
	ldr	r2, .L10+12
	ldr	lr, [ip]
	ldr	ip, [r1]
	ldr	r1, [r2]
	mov	r2, r5
	stm	sp, {r1, ip, lr}
	mov	r1, r3
	bl	mlx4_cmd
	mov	r5, r0
	cmp	r5, #0
	beq	.L9
.L1:
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	PTR_ERR
.L11:
	.align	2
.L10:
	.word	MLX4_FLAG_OLD_PORT_CMDS
	.word	MLX4_CMD_NATIVE
	.word	MLX4_CMD_TIME_CLASS_A
	.word	MLX4_CMD_INIT_PORT
	.word	MLX4_CMD_WRAPPED
	.size	mlx4_INIT_PORT, .-mlx4_INIT_PORT
	.comm	MLX4_FLAG_OLD_PORT_CMDS,4,4
	.comm	MLX4_CMD_WRAPPED,4,4
	.comm	MLX4_CMD_TIME_CLASS_A,4,4
	.comm	MLX4_CMD_NATIVE,4,4
	.comm	MLX4_CMD_INIT_PORT,4,4
	.comm	INIT_PORT_VL_SHIFT,4,4
	.comm	INIT_PORT_PORT_WIDTH_SHIFT,4,4
	.comm	INIT_PORT_MTU_OFFSET,4,4
	.comm	INIT_PORT_MAX_PKEY_OFFSET,4,4
	.comm	INIT_PORT_MAX_GID_OFFSET,4,4
	.comm	INIT_PORT_FLAGS_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
