	.file	"extr_hns_roce_main.c_hns_roce_query_port.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"find netdev %d failed!\r\n"
	.text
	.p2align 4
	.type	hns_roce_query_port, @function
hns_roce_query_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	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdx
	call	to_hr_dev@PLT
	xor	edi, edi
	test	r12, r12
	setg	dil
	mov	rbp, rax
	mov	r13, QWORD PTR 32[rax]
	sub	r12, 1
	call	assert@PLT
	mov	eax, DWORD PTR 24[rbp]
	xor	esi, esi
	mov	rdi, rbp
	mov	DWORD PTR 28[rbx], eax
	mov	rax, QWORD PTR 16[rbp]
	mov	eax, DWORD PTR [rax+r12*4]
	mov	DWORD PTR 44[rbx], eax
	mov	eax, DWORD PTR IB_PORT_CM_SUP[rip]
	or	eax, DWORD PTR IB_PORT_REINIT_SUP[rip]
	or	eax, DWORD PTR IB_PORT_VENDOR_CLASS_SUP[rip]
	or	eax, DWORD PTR IB_PORT_BOOT_MGMT_SUP[rip]
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR HNS_ROCE_MAX_MSG_LEN[rip]
	mov	DWORD PTR 40[rbx], eax
	mov	eax, DWORD PTR IB_WIDTH_4X[rip]
	mov	DWORD PTR 36[rbx], eax
	movabs	rax, 4294967297
	mov	QWORD PTR 4[rbx], rax
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	r14, QWORD PTR [rax+r12*8]
	test	r14, r14
	je	.L19
	mov	edi, DWORD PTR [r14]
	call	iboe_get_mtu@PLT
	mov	esi, eax
	mov	eax, DWORD PTR IB_MTU_256[rip]
	test	esi, esi
	jne	.L20
.L5:
	mov	DWORD PTR 32[rbx], eax
	mov	rdi, r14
	call	netif_running@PLT
	test	rax, rax
	jne	.L21
.L6:
	mov	rax, QWORD PTR IB_PORT_DOWN[rip]
	cmp	rax, QWORD PTR IB_PORT_ACTIVE[rip]
	mov	edx, DWORD PTR IB_PORT_PHYS_STATE_DISABLED[rip]
	mov	QWORD PTR 16[rbx], rax
	je	.L7
.L9:
	mov	DWORD PTR 24[rbx], edx
	mov	rdi, rbp
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L21:
	.cfi_restore_state
	mov	rdi, r14
	call	netif_carrier_ok@PLT
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR IB_PORT_ACTIVE[rip]
	mov	QWORD PTR 16[rbx], rax
.L7:
	mov	edx, DWORD PTR IB_PORT_PHYS_STATE_LINK_UP[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR 28[rbx]
	call	min@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, rbp
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	mov	rdx, r12
	mov	rdi, r13
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	hns_roce_query_port, .-hns_roce_query_port
	.comm	IB_WIDTH_4X,4,4
	.comm	IB_PORT_VENDOR_CLASS_SUP,4,4
	.comm	IB_PORT_REINIT_SUP,4,4
	.comm	IB_PORT_PHYS_STATE_LINK_UP,4,4
	.comm	IB_PORT_PHYS_STATE_DISABLED,4,4
	.comm	IB_PORT_DOWN,8,8
	.comm	IB_PORT_CM_SUP,4,4
	.comm	IB_PORT_BOOT_MGMT_SUP,4,4
	.comm	IB_PORT_ACTIVE,8,8
	.comm	IB_MTU_256,4,4
	.comm	HNS_ROCE_MAX_MSG_LEN,4,4
	.comm	EINVAL,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_hns_roce_main.c_hns_roce_query_port.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"find netdev %d failed!\015\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hns_roce_query_port, %function
hns_roce_query_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r2
	mov	r6, r1
	bl	to_hr_dev
	mov	r5, r0
	cmp	r6, #0
	movle	r0, #0
	movgt	r0, #1
	ldr	r7, [r5, #16]
	bl	assert
	mov	r2, #1
	ldr	r3, .L21
	ldr	r1, .L21+4
	ldr	r0, [r5, #12]
	ldr	r1, [r1]
	ldr	r3, [r3]
	str	r0, [r4, #20]
	orr	r3, r3, r1
	ldr	r0, [r5, #8]
	ldr	r1, .L21+8
	sub	r6, r6, #1
	ldr	ip, [r0, r6, lsl #2]
	ldr	r0, [r1]
	ldr	r1, .L21+12
	orr	r3, r3, r0
	ldr	r0, [r1]
	ldr	r1, .L21+16
	orr	r3, r3, r0
	ldr	r0, [r1]
	ldr	r1, .L21+20
	str	r0, [r4, #32]
	ldr	r1, [r1]
	mov	r0, r5
	str	r3, [r4]
	str	r1, [r4, #28]
	str	ip, [r4, #36]
	mov	r1, #0
	str	r2, [r4, #4]
	str	r2, [r4, #8]
	bl	spin_lock_irqsave
	ldr	r3, [r5, #4]
	ldr	r8, [r3, r6, lsl #2]
	cmp	r8, #0
	beq	.L18
	ldr	r0, [r8]
	bl	iboe_get_mtu
	subs	r1, r0, #0
	bne	.L19
	ldr	r3, .L21+24
	ldr	r0, [r3]
.L5:
	str	r0, [r4, #24]
	mov	r0, r8
	bl	netif_running
	cmp	r0, #0
	bne	.L20
.L6:
	ldr	r3, .L21+28
	ldr	r2, .L21+32
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r3, [r4, #12]
	cmp	r3, r2
	beq	.L7
	ldr	r3, .L21+36
	ldr	r3, [r3]
.L9:
	mov	r0, r5
	mov	r1, #0
	str	r3, [r4, #16]
	bl	spin_unlock_irqrestore
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	mov	r0, r8
	bl	netif_carrier_ok
	cmp	r0, #0
	beq	.L6
	ldr	r3, .L21+32
	ldr	r3, [r3]
	str	r3, [r4, #12]
.L7:
	ldr	r3, .L21+40
	ldr	r3, [r3]
	b	.L9
.L19:
	ldr	r0, [r4, #20]
	bl	min
	b	.L5
.L18:
	mov	r0, r5
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r2, r6
	mov	r0, r7
	ldr	r1, .L21+44
	bl	dev_err
	ldr	r3, .L21+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	.align	2
.L21:
	.word	IB_PORT_CM_SUP
	.word	IB_PORT_REINIT_SUP
	.word	IB_PORT_VENDOR_CLASS_SUP
	.word	IB_PORT_BOOT_MGMT_SUP
	.word	HNS_ROCE_MAX_MSG_LEN
	.word	IB_WIDTH_4X
	.word	IB_MTU_256
	.word	IB_PORT_DOWN
	.word	IB_PORT_ACTIVE
	.word	IB_PORT_PHYS_STATE_DISABLED
	.word	IB_PORT_PHYS_STATE_LINK_UP
	.word	.LC0
	.word	EINVAL
	.size	hns_roce_query_port, .-hns_roce_query_port
	.comm	IB_WIDTH_4X,4,4
	.comm	IB_PORT_VENDOR_CLASS_SUP,4,4
	.comm	IB_PORT_REINIT_SUP,4,4
	.comm	IB_PORT_PHYS_STATE_LINK_UP,4,4
	.comm	IB_PORT_PHYS_STATE_DISABLED,4,4
	.comm	IB_PORT_DOWN,4,4
	.comm	IB_PORT_CM_SUP,4,4
	.comm	IB_PORT_BOOT_MGMT_SUP,4,4
	.comm	IB_PORT_ACTIVE,4,4
	.comm	IB_MTU_256,4,4
	.comm	HNS_ROCE_MAX_MSG_LEN,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
