	.file	"extr_main.c_eth_link_query_port.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	eth_link_query_port, @function
eth_link_query_port:
.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
	movsx	r13, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	to_mdev@PLT
	mov	rdi, QWORD PTR [rax]
	mov	rbp, rax
	call	mlx4_alloc_cmd_mailbox@PLT
	mov	rdi, rax
	mov	r12, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L23
	mov	eax, DWORD PTR MLX4_CMD_WRAPPED[rip]
	mov	edx, DWORD PTR 8[r12]
	xor	r8d, r8d
	xor	esi, esi
	mov	r9d, DWORD PTR MLX4_CMD_QUERY_PORT[rip]
	mov	ecx, r13d
	push	rax
	.cfi_def_cfa_offset 72
	mov	eax, DWORD PTR MLX4_CMD_TIME_CLASS_B[rip]
	push	rax
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR 0[rbp]
	call	mlx4_cmd_box@PLT
	mov	r14d, eax
	pop	rax
	.cfi_def_cfa_offset 72
	pop	rdx
	.cfi_def_cfa_offset 64
	test	r14d, r14d
	jne	.L3
	mov	rdx, QWORD PTR [r12]
	mov	eax, DWORD PTR IB_WIDTH_1X[rip]
	cmp	DWORD PTR 20[rdx], 64
	jne	.L5
	mov	eax, DWORD PTR IB_WIDTH_4X[rip]
.L5:
	mov	DWORD PTR 56[rbx], eax
	mov	eax, DWORD PTR IB_SPEED_QDR[rip]
	lea	r15, 8[rbp]
	mov	rdi, QWORD PTR IB_PORT_DOWN[rip]
	mov	DWORD PTR 52[rbx], eax
	mov	eax, DWORD PTR IB_PORT_CM_SUP[rip]
	mov	DWORD PTR 48[rbx], eax
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR [rdx+r13*4]
	mov	DWORD PTR 40[rbx], eax
	mov	eax, DWORD PTR IB_MTU_4096[rip]
	mov	QWORD PTR 8[rbx], rdi
	mov	DWORD PTR 44[rbx], edx
	mov	DWORD PTR 24[rbx], eax
	movabs	rax, 8589934593
	mov	QWORD PTR [rbx], rax
	call	state_to_phys_state@PLT
	mov	rdi, r15
	mov	QWORD PTR 16[rbx], rax
	mov	rax, QWORD PTR IB_MTU_256[rip]
	mov	QWORD PTR 32[rbx], rax
	call	spin_lock@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	r13, QWORD PTR -8[rax+r13*8]
	test	r13, r13
	je	.L6
	mov	edi, DWORD PTR 0[r13]
	call	iboe_get_mtu@PLT
	mov	esi, eax
	mov	rax, QWORD PTR IB_MTU_256[rip]
	test	esi, esi
	jne	.L24
.L8:
	mov	QWORD PTR 32[rbx], rax
	mov	rdi, r13
	call	netif_running@PLT
	test	rax, rax
	jne	.L25
.L9:
	mov	rdi, QWORD PTR IB_PORT_DOWN[rip]
.L10:
	mov	QWORD PTR 8[rbx], rdi
	call	state_to_phys_state@PLT
	mov	QWORD PTR 16[rbx], rax
.L6:
	mov	rdi, r15
	call	spin_unlock@PLT
.L3:
	mov	rdi, QWORD PTR 0[rbp]
	mov	rsi, r12
	call	mlx4_free_cmd_mailbox@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L23:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r12
	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	PTR_ERR@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	edi, DWORD PTR 24[rbx]
	call	min@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, r13
	call	netif_carrier_ok@PLT
	mov	rdi, QWORD PTR IB_PORT_ACTIVE[rip]
	test	rax, rax
	jne	.L10
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	eth_link_query_port, .-eth_link_query_port
	.comm	MLX4_CMD_WRAPPED,4,4
	.comm	MLX4_CMD_TIME_CLASS_B,4,4
	.comm	MLX4_CMD_QUERY_PORT,4,4
	.comm	IB_WIDTH_4X,4,4
	.comm	IB_WIDTH_1X,4,4
	.comm	IB_SPEED_QDR,4,4
	.comm	IB_PORT_DOWN,8,8
	.comm	IB_PORT_CM_SUP,4,4
	.comm	IB_PORT_ACTIVE,8,8
	.comm	IB_MTU_4096,4,4
	.comm	IB_MTU_256,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_main.c_eth_link_query_port.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	eth_link_query_port, %function
eth_link_query_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	mov	r6, r1
	mov	r4, r2
	bl	to_mdev
	mov	r5, r0
	ldr	r0, [r0]
	bl	mlx4_alloc_cmd_mailbox
	mov	r7, r0
	bl	IS_ERR
	subs	r1, r0, #0
	bne	.L22
	ldr	r2, .L25
	ldr	ip, .L25+4
	ldr	r3, .L25+8
	ldr	lr, [r2]
	ldr	r3, [r3]
	ldr	ip, [ip]
	ldr	r2, [r7, #4]
	ldr	r0, [r5]
	stm	sp, {r1, r3, ip, lr}
	mov	r3, r6
	bl	mlx4_cmd_box
	subs	r9, r0, #0
	bne	.L3
	mov	r8, r5
	mov	r1, #1
	mov	r2, #2
	ldr	r3, [r7]
	ldr	lr, .L25+12
	ldr	r3, [r3, #20]
	ldr	ip, .L25+16
	cmp	r3, #64
	ldreq	r3, .L25+20
	ldrne	r3, .L25+24
	ldr	lr, [lr]
	ldr	r0, [r3]
	ldr	r3, [r8], #4
	ldr	ip, [ip]
	str	r0, [r4, #40]
	ldr	r0, [r3, #4]
	str	lr, [r4, #36]
	str	ip, [r4, #32]
	ldr	r0, [r0, r6, lsl #2]
	ldr	lr, .L25+28
	ldr	r10, .L25+32
	ldr	ip, [r3]
	ldr	r3, [lr]
	str	r0, [r4, #28]
	ldr	r0, [r10]
	str	ip, [r4, #24]
	stm	r4, {r1, r2}
	str	r3, [r4, #16]
	str	r0, [r4, #8]
	bl	state_to_phys_state
	ldr	fp, .L25+36
	str	r0, [r4, #12]
	ldr	r3, [fp]
	mov	r0, r8
	str	r3, [r4, #20]
	bl	spin_lock
	ldr	r1, [r5, #8]
	lsl	r6, r6, #2
	add	r6, r1, r6
	ldr	r6, [r6, #-4]
	cmp	r6, #0
	beq	.L6
	ldr	r0, [r6]
	bl	iboe_get_mtu
	subs	r1, r0, #0
	ldreq	r0, [fp]
	bne	.L23
.L8:
	str	r0, [r4, #20]
	mov	r0, r6
	bl	netif_running
	cmp	r0, #0
	bne	.L24
.L9:
	ldr	r0, [r10]
.L10:
	str	r0, [r4, #8]
	bl	state_to_phys_state
	str	r0, [r4, #12]
.L6:
	mov	r0, r8
	bl	spin_unlock
.L3:
	mov	r1, r7
	ldr	r0, [r5]
	bl	mlx4_free_cmd_mailbox
	mov	r0, r9
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	mov	r0, r7
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	PTR_ERR
.L23:
	ldr	r0, [r4, #16]
	bl	min
	b	.L8
.L24:
	mov	r0, r6
	bl	netif_carrier_ok
	cmp	r0, #0
	beq	.L9
	ldr	r3, .L25+40
	ldr	r0, [r3]
	b	.L10
.L26:
	.align	2
.L25:
	.word	MLX4_CMD_WRAPPED
	.word	MLX4_CMD_TIME_CLASS_B
	.word	MLX4_CMD_QUERY_PORT
	.word	IB_SPEED_QDR
	.word	IB_PORT_CM_SUP
	.word	IB_WIDTH_4X
	.word	IB_WIDTH_1X
	.word	IB_MTU_4096
	.word	IB_PORT_DOWN
	.word	IB_MTU_256
	.word	IB_PORT_ACTIVE
	.size	eth_link_query_port, .-eth_link_query_port
	.comm	MLX4_CMD_WRAPPED,4,4
	.comm	MLX4_CMD_TIME_CLASS_B,4,4
	.comm	MLX4_CMD_QUERY_PORT,4,4
	.comm	IB_WIDTH_4X,4,4
	.comm	IB_WIDTH_1X,4,4
	.comm	IB_SPEED_QDR,4,4
	.comm	IB_PORT_DOWN,4,4
	.comm	IB_PORT_CM_SUP,4,4
	.comm	IB_PORT_ACTIVE,4,4
	.comm	IB_MTU_4096,4,4
	.comm	IB_MTU_256,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
