	.file	"extr_ocs_hw.c_ocs_hw_port_control.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"no buffer for command\n"
.LC1:
	.string	"CONFIG_LINK failed\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Cannot bring up link.  Please update firmware to %s or later (current version is %s)\n"
	.section	.rodata.str1.1
.LC3:
	.string	"INIT_LINK failed\n"
.LC4:
	.string	"DOWN_LINK failed\n"
.LC5:
	.string	"unhandled control %#x\n"
	.text
	.p2align 4
	.globl	ocs_hw_port_control
	.type	ocs_hw_port_control, @function
ocs_hw_port_control:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r12d, DWORD PTR OCS_HW_RTN_ERROR[rip]
	cmp	esi, 129
	je	.L2
	cmp	esi, 130
	je	.L3
	cmp	esi, 128
	je	.L33
	mov	edi, DWORD PTR [rdi]
	mov	edx, esi
	lea	rsi, .LC5[rip]
	call	ocs_log_test@PLT
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR OCS_CMD_NOWAIT[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, ebx
	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
	jmp	ocs_hw_set_linkcfg@PLT
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	edx, DWORD PTR OCS_M_NOWAIT[rip]
	mov	esi, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	edi, DWORD PTR [rdi]
	call	ocs_malloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L31
	mov	edx, DWORD PTR SLI4_BMBX_SIZE[rip]
	lea	rdi, 4[rbp]
	mov	rsi, rax
	call	sli_cmd_down_link@PLT
	test	eax, eax
	jne	.L34
.L18:
	cmp	DWORD PTR OCS_HW_RTN_SUCCESS[rip], r12d
	je	.L1
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	rsi, r13
	call	ocs_free@PLT
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	ocs_log_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	lea	r13, 4[rdi]
	mov	rdi, r13
	call	sli_get_medium@PLT
	xor	r8d, r8d
	cmp	eax, DWORD PTR SLI_LINK_MEDIUM_FC[rip]
	mov	r15d, DWORD PTR FC_LINK_SPEED_10G[rip]
	je	.L35
.L11:
	mov	eax, DWORD PTR 8[rbp]
	test	eax, eax
	je	.L12
	mov	eax, DWORD PTR SLI4_IF_TYPE_LANCER_FC_ETH[rip]
	xor	esi, esi
	mov	rdi, r13
	cmp	DWORD PTR 4[rbp], eax
	je	.L36
	call	sli_get_fw_name@PLT
	mov	edi, DWORD PTR OCS_MIN_FW_VER_SKYHAWK[rip]
	mov	r12, rax
.L30:
	call	OCS_FW_VER_STR@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	rcx, r12
	lea	rsi, .LC2[rip]
	mov	edx, eax
	xor	eax, eax
	call	ocs_log_err@PLT
	mov	r12d, DWORD PTR OCS_HW_RTN_ERROR[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, DWORD PTR OCS_M_NOWAIT[rip]
	mov	esi, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	DWORD PTR 12[rsp], r8d
	mov	edi, DWORD PTR 0[rbp]
	mov	r12d, DWORD PTR OCS_HW_RTN_ERROR[rip]
	call	ocs_malloc@PLT
	mov	r8d, DWORD PTR 12[rsp]
	test	rax, rax
	mov	r14, rax
	je	.L31
	mov	edx, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	ecx, r15d
	mov	rsi, rax
	mov	rdi, r13
	call	sli_cmd_init_link@PLT
	test	eax, eax
	jne	.L37
.L16:
	cmp	DWORD PTR OCS_HW_RTN_SUCCESS[rip], r12d
	je	.L1
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	rsi, r14
	call	ocs_free@PLT
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	ocs_log_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	ecx, DWORD PTR ocs_hw_cb_port_control[rip]
	xor	r8d, r8d
	mov	rsi, r13
	mov	rdi, rbp
	mov	edx, DWORD PTR OCS_CMD_NOWAIT[rip]
	call	ocs_hw_command@PLT
	mov	r12d, eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L35:
	mov	edx, DWORD PTR OCS_M_NOWAIT[rip]
	mov	esi, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	edi, DWORD PTR 0[rbp]
	call	ocs_malloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L31
	mov	edx, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	rsi, rax
	mov	rdi, r13
	call	sli_cmd_config_link@PLT
	test	eax, eax
	jne	.L38
.L9:
	cmp	DWORD PTR OCS_HW_RTN_SUCCESS[rip], r12d
	je	.L10
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR SLI4_BMBX_SIZE[rip]
	mov	rsi, r14
	call	ocs_free@PLT
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ocs_log_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	ocs_log_err@PLT
	mov	r12d, DWORD PTR OCS_HW_RTN_NO_MEMORY[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	call	sli_get_fw_name@PLT
	mov	edi, DWORD PTR OCS_MIN_FW_VER_LANCER[rip]
	mov	r12, rax
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L37:
	mov	ecx, DWORD PTR ocs_hw_cb_port_control[rip]
	xor	r8d, r8d
	mov	rsi, r14
	mov	rdi, rbp
	mov	edx, DWORD PTR OCS_CMD_NOWAIT[rip]
	call	ocs_hw_command@PLT
	mov	r12d, eax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r15d, DWORD PTR 12[rbp]
	movzx	r8d, bl
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L38:
	mov	ecx, DWORD PTR ocs_hw_cb_port_control[rip]
	xor	r8d, r8d
	mov	rsi, r14
	mov	rdi, rbp
	mov	edx, DWORD PTR OCS_CMD_NOWAIT[rip]
	call	ocs_hw_command@PLT
	mov	r12d, eax
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	ocs_hw_port_control, .-ocs_hw_port_control
	.comm	ocs_hw_cb_port_control,4,4
	.comm	SLI_LINK_MEDIUM_FC,4,4
	.comm	SLI4_IF_TYPE_LANCER_FC_ETH,4,4
	.comm	SLI4_BMBX_SIZE,4,4
	.comm	OCS_M_NOWAIT,4,4
	.comm	OCS_MIN_FW_VER_SKYHAWK,4,4
	.comm	OCS_MIN_FW_VER_LANCER,4,4
	.comm	OCS_HW_RTN_SUCCESS,4,4
	.comm	OCS_HW_RTN_NO_MEMORY,4,4
	.comm	OCS_HW_RTN_ERROR,4,4
	.comm	OCS_CMD_NOWAIT,4,4
	.comm	FC_LINK_SPEED_10G,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_ocs_hw.c_ocs_hw_port_control.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"no buffer for command\012\000"
	.align	2
.LC1:
	.ascii	"CONFIG_LINK failed\012\000"
	.align	2
.LC2:
	.ascii	"Cannot bring up link.  Please update firmware to %s"
	.ascii	" or later (current version is %s)\012\000"
	.align	2
.LC3:
	.ascii	"INIT_LINK failed\012\000"
	.align	2
.LC4:
	.ascii	"DOWN_LINK failed\012\000"
	.align	2
.LC5:
	.ascii	"unhandled control %#x\012\000"
	.text
	.align	2
	.global	ocs_hw_port_control
	.syntax unified
	.arm
	.fpu softvfp
	.type	ocs_hw_port_control, %function
ocs_hw_port_control:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L38
	cmp	r1, #129
	mov	r5, r2
	ldr	r6, [r7]
	sub	sp, sp, #20
	beq	.L2
	cmp	r1, #130
	mov	r4, r0
	beq	.L3
	cmp	r1, #128
	beq	.L33
	mov	r2, r1
	ldr	r0, [r0]
	ldr	r1, .L38+4
	bl	ocs_log_test
.L1:
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r1, r5
	ldr	r2, .L38+8
	ldr	r2, [r2]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ocs_hw_set_linkcfg
.L33:
	ldr	r3, .L38+12
	ldr	r8, .L38+16
	ldr	r2, [r3]
	ldr	r1, [r8]
	ldr	r0, [r0]
	bl	ocs_malloc
	subs	r5, r0, #0
	beq	.L31
	mov	r1, r5
	ldr	r2, [r8]
	add	r0, r4, #4
	bl	sli_cmd_down_link
	cmp	r0, #0
	bne	.L34
.L18:
	ldr	r3, .L38+20
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L1
	mov	r1, r5
	ldr	r2, [r8]
	ldr	r0, [r4]
	bl	ocs_free
	ldr	r0, [r4]
	ldr	r1, .L38+24
	bl	ocs_log_err
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	add	r9, r0, #4
	mov	r0, r9
	bl	sli_get_medium
	ldr	r3, .L38+28
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L35
	mov	r5, #0
	ldr	r3, .L38+32
	ldr	r10, [r4]
	ldr	r3, [r3]
.L11:
	ldr	fp, [r4, #8]
	cmp	fp, #0
	beq	.L12
	ldr	r3, .L38+36
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	ldreq	r3, .L38+40
	ldrne	r3, .L38+44
	ldr	r0, [r3]
	bl	OCS_FW_VER_STR
	mov	r1, #0
	mov	r4, r0
	mov	r0, r9
	bl	sli_get_fw_name
	mov	r2, r4
	mov	r3, r0
	ldr	r1, .L38+48
	mov	r0, r10
	bl	ocs_log_err
	ldr	r6, [r7]
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L34:
	mov	r1, #0
	ldr	r3, .L38+52
	ldr	r2, .L38+8
	str	r1, [sp]
	mov	r0, r4
	mov	r1, r5
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	ocs_hw_command
	mov	r6, r0
	b	.L18
.L35:
	ldr	r3, .L38+12
	ldr	r8, .L38+16
	ldr	r2, [r3]
	ldr	r1, [r8]
	ldr	r0, [r4]
	bl	ocs_malloc
	subs	fp, r0, #0
	beq	.L31
	mov	r1, fp
	mov	r0, r9
	ldr	r2, [r8]
	bl	sli_cmd_config_link
	cmp	r0, #0
	bne	.L36
.L9:
	ldr	r3, .L38+20
	ldr	r10, [r4]
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L10
	mov	r1, fp
	mov	r0, r10
	ldr	r2, [r8]
	bl	ocs_free
	ldr	r0, [r4]
	ldr	r1, .L38+56
	bl	ocs_log_err
	b	.L1
.L31:
	ldr	r0, [r4]
	ldr	r1, .L38+60
	bl	ocs_log_err
	ldr	r3, .L38+64
	ldr	r6, [r3]
	b	.L1
.L12:
	ldr	r2, .L38+12
	ldr	r8, .L38+16
	mov	r0, r10
	ldr	r2, [r2]
	ldr	r1, [r8]
	ldr	r6, [r7]
	str	r3, [sp, #12]
	bl	ocs_malloc
	subs	r7, r0, #0
	ldr	r3, [sp, #12]
	beq	.L31
	mov	r0, r9
	mov	r1, r7
	ldr	r2, [r8]
	str	r5, [sp]
	bl	sli_cmd_init_link
	cmp	r0, #0
	bne	.L37
.L16:
	ldr	r3, .L38+20
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L1
	mov	r1, r7
	ldr	r2, [r8]
	ldr	r0, [r4]
	bl	ocs_free
	ldr	r0, [r4]
	ldr	r1, .L38+68
	bl	ocs_log_err
	b	.L1
.L37:
	ldr	r3, .L38+52
	ldr	r2, .L38+8
	str	fp, [sp]
	mov	r1, r7
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	ocs_hw_command
	mov	r6, r0
	b	.L16
.L10:
	ldr	r3, [r4, #12]
	and	r5, r5, #255
	b	.L11
.L36:
	mov	r1, #0
	ldr	r3, .L38+52
	ldr	r2, .L38+8
	str	r1, [sp]
	mov	r0, r4
	mov	r1, fp
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	ocs_hw_command
	mov	r6, r0
	b	.L9
.L39:
	.align	2
.L38:
	.word	OCS_HW_RTN_ERROR
	.word	.LC5
	.word	OCS_CMD_NOWAIT
	.word	OCS_M_NOWAIT
	.word	SLI4_BMBX_SIZE
	.word	OCS_HW_RTN_SUCCESS
	.word	.LC4
	.word	SLI_LINK_MEDIUM_FC
	.word	FC_LINK_SPEED_10G
	.word	SLI4_IF_TYPE_LANCER_FC_ETH
	.word	OCS_MIN_FW_VER_LANCER
	.word	OCS_MIN_FW_VER_SKYHAWK
	.word	.LC2
	.word	ocs_hw_cb_port_control
	.word	.LC1
	.word	.LC0
	.word	OCS_HW_RTN_NO_MEMORY
	.word	.LC3
	.size	ocs_hw_port_control, .-ocs_hw_port_control
	.comm	ocs_hw_cb_port_control,4,4
	.comm	SLI_LINK_MEDIUM_FC,4,4
	.comm	SLI4_IF_TYPE_LANCER_FC_ETH,4,4
	.comm	SLI4_BMBX_SIZE,4,4
	.comm	OCS_M_NOWAIT,4,4
	.comm	OCS_MIN_FW_VER_SKYHAWK,4,4
	.comm	OCS_MIN_FW_VER_LANCER,4,4
	.comm	OCS_HW_RTN_SUCCESS,4,4
	.comm	OCS_HW_RTN_NO_MEMORY,4,4
	.comm	OCS_HW_RTN_ERROR,4,4
	.comm	OCS_CMD_NOWAIT,4,4
	.comm	FC_LINK_SPEED_10G,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
