	.file	"extr_qib_mad.c_subn_get_portinfo.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	subn_get_portinfo, @function
subn_get_portinfo:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR 28[rdi]
	call	be32_to_cpu@PLT
	movsx	rbp, eax
	test	ebp, ebp
	je	.L18
	cmp	DWORD PTR 0[r13], ebp
	jl	.L33
	cmp	ebp, r14d
	jne	.L34
.L2:
	mov	rdi, r13
	call	dd_from_ibdev@PLT
	mov	rdi, QWORD PTR 16[r12]
	xor	esi, esi
	mov	r13, rax
	lea	rax, 0[rbp+rbp*2]
	lea	rdx, 0[rbp+rax*4]
	mov	rax, QWORD PTR 24[r13]
	lea	rbp, -104[rax+rdx*8]
	mov	edx, 8
	call	memset@PLT
	mov	rax, QWORD PTR IB_MGMT_METHOD_GET[rip]
	cmp	QWORD PTR [r12], rax
	mov	rax, QWORD PTR 48[rbp]
	je	.L5
.L6:
	mov	QWORD PTR [rbx], rax
.L7:
	mov	eax, DWORD PTR 96[rbp]
	mov	edi, DWORD PTR 40[rbp]
	mov	DWORD PTR 152[rbx], eax
	call	cpu_to_be16@PLT
	mov	edi, DWORD PTR 92[rbp]
	mov	QWORD PTR 144[rbx], rax
	call	cpu_to_be16@PLT
	mov	edi, DWORD PTR 60[rbp]
	mov	QWORD PTR 136[rbx], rax
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR 88[rbp]
	mov	DWORD PTR 128[rbx], eax
	call	cpu_to_be16@PLT
	mov	DWORD PTR 8[rbx], r14d
	mov	edi, DWORD PTR 24[rbp]
	mov	QWORD PTR 120[rbx], rax
	mov	eax, DWORD PTR 36[rbp]
	mov	DWORD PTR 116[rbx], eax
	mov	eax, DWORD PTR 32[rbp]
	mov	DWORD PTR 112[rbx], eax
	mov	eax, DWORD PTR 28[rbp]
	mov	DWORD PTR 108[rbx], eax
	call	[QWORD PTR 0[r13]]
	mov	edi, DWORD PTR 24[rbp]
	mov	r8d, eax
	mov	eax, DWORD PTR 0[rbp]
	sal	eax, 4
	or	eax, r8d
	mov	DWORD PTR 12[rbx], eax
	call	[QWORD PTR 8[r13]]
	mov	rdi, rbp
	sal	eax, 4
	mov	r14d, eax
	call	get_linkdowndefaultstate@PLT
	mov	edx, DWORD PTR 16[rbp]
	test	rax, rax
	sete	al
	movzx	eax, al
	add	eax, 1
	or	r14d, eax
	mov	eax, DWORD PTR 56[rbp]
	mov	DWORD PTR 16[rbx], r14d
	sal	eax, 6
	or	eax, DWORD PTR 4[rbp]
	mov	DWORD PTR 20[rbx], eax
	mov	eax, DWORD PTR 8[rbp]
	sal	eax, 4
	or	eax, DWORD PTR 12[rbp]
	mov	DWORD PTR 24[rbx], eax
	cmp	edx, 1024
	je	.L9
	jg	.L10
	mov	eax, DWORD PTR IB_MTU_256[rip]
	cmp	edx, 256
	je	.L15
	cmp	edx, 512
	jne	.L13
	mov	eax, DWORD PTR IB_MTU_512[rip]
	.p2align 4,,10
	.p2align 3
.L15:
	sal	eax, 4
	or	eax, DWORD PTR 64[rbp]
	mov	esi, DWORD PTR QIB_IB_CFG_VL_HIGH_CAP[rip]
	mov	rdi, rbp
	mov	DWORD PTR 28[rbx], eax
	mov	eax, DWORD PTR 20[rbp]
	sal	eax, 4
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR 84[rbp]
	mov	DWORD PTR 104[rbx], eax
	call	[QWORD PTR 16[r13]]
	mov	esi, DWORD PTR QIB_IB_CFG_VL_LOW_CAP[rip]
	mov	rdi, rbp
	mov	DWORD PTR 36[rbx], eax
	call	[QWORD PTR 16[r13]]
	mov	esi, DWORD PTR QIB_IB_CFG_OP_VLS[rip]
	mov	rdi, rbp
	mov	DWORD PTR 40[rbx], eax
	mov	rax, QWORD PTR qib_ibmtu[rip]
	test	rax, rax
	cmove	rax, QWORD PTR IB_MTU_4096[rip]
	mov	QWORD PTR 96[rbx], rax
	call	[QWORD PTR 16[r13]]
	mov	edi, DWORD PTR 80[rbp]
	sal	eax, 4
	mov	DWORD PTR 44[rbx], eax
	call	cpu_to_be16@PLT
	mov	edi, DWORD PTR 76[rbp]
	mov	QWORD PTR 88[rbx], rax
	call	cpu_to_be16@PLT
	mov	edi, DWORD PTR 72[rbp]
	mov	QWORD PTR 80[rbx], rax
	call	cpu_to_be16@PLT
	mov	rdi, rbp
	mov	QWORD PTR 72[rbx], rax
	mov	eax, DWORD PTR QIB_GUIDS_PER_PORT[rip]
	mov	DWORD PTR 68[rbx], eax
	mov	eax, DWORD PTR 68[rbp]
	mov	DWORD PTR 48[rbx], 3
	mov	DWORD PTR 64[rbx], eax
	call	get_phyerrthreshold@PLT
	mov	rdi, rbp
	mov	r14d, eax
	call	get_overrunthreshold@PLT
	sal	r14d, 4
	or	r14d, eax
	mov	eax, DWORD PTR 60[rbp]
	mov	DWORD PTR 52[rbx], r14d
	test	DWORD PTR IB_PORT_LINK_LATENCY_SUP[rip], eax
	je	.L17
	mov	esi, DWORD PTR QIB_IB_CFG_LINKLATENCY[rip]
	mov	rdi, rbp
	call	[QWORD PTR 16[r13]]
	mov	rdx, QWORD PTR 56[rbx]
	mov	ecx, eax
	sar	ecx, 16
	mov	DWORD PTR 8[rdx], eax
	mov	DWORD PTR [rdx], ecx
	mov	ecx, eax
	sar	ecx, 8
	mov	DWORD PTR 4[rdx], ecx
.L17:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	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	reply@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR IB_MTU_2048[rip]
	cmp	edx, 2048
	je	.L15
.L13:
	mov	eax, DWORD PTR IB_MTU_4096[rip]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L34:
	mov	esi, ebp
	mov	rdi, r13
	call	to_iport@PLT
	xor	edx, edx
	mov	rsi, r12
	mov	rdi, rax
	call	check_mkey@PLT
	test	eax, eax
	je	.L2
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR IB_MAD_RESULT_FAILURE[rip]
	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
.L18:
	.cfi_restore_state
	movsx	rbp, r14d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	rax, QWORD PTR 8[r12]
	je	.L6
	cmp	DWORD PTR 56[rbp], 1
	jne	.L6
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR IB_MTU_1024[rip]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L33:
	mov	eax, DWORD PTR IB_SMP_INVALID_FIELD[rip]
	or	DWORD PTR 24[r12], eax
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 40
	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	reply@PLT
.L4:
	.cfi_endproc
.LFE0:
	.size	subn_get_portinfo, .-subn_get_portinfo
	.comm	qib_ibmtu,8,8
	.comm	QIB_IB_CFG_VL_LOW_CAP,4,4
	.comm	QIB_IB_CFG_VL_HIGH_CAP,4,4
	.comm	QIB_IB_CFG_OP_VLS,4,4
	.comm	QIB_IB_CFG_LINKLATENCY,4,4
	.comm	QIB_GUIDS_PER_PORT,4,4
	.comm	IB_SMP_INVALID_FIELD,4,4
	.comm	IB_PORT_LINK_LATENCY_SUP,4,4
	.comm	IB_MTU_512,4,4
	.comm	IB_MTU_4096,8,8
	.comm	IB_MTU_256,4,4
	.comm	IB_MTU_2048,4,4
	.comm	IB_MTU_1024,4,4
	.comm	IB_MGMT_METHOD_GET,8,8
	.comm	IB_MAD_RESULT_FAILURE,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_qib_mad.c_subn_get_portinfo.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	subn_get_portinfo, %function
subn_get_portinfo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	ldr	r0, [r0, #16]
	mov	r7, r1
	mov	r8, r2
	ldr	r5, [r6, #8]
	bl	be32_to_cpu
	subs	r4, r0, #0
	beq	.L18
	ldr	r3, [r7]
	cmp	r3, r4
	blt	.L34
	cmp	r4, r8
	bne	.L35
.L2:
	mov	r0, r7
	bl	dd_from_ibdev
	mov	r7, r0
	add	r0, r4, r4, lsl #1
	mov	r2, #4
	rsb	r4, r4, r0, lsl #3
	mov	r1, #0
	ldr	r0, [r6, #8]
	ldr	r10, [r7, #12]
	bl	memset
	ldr	r3, .L36
	lsl	r4, r4, #2
	ldr	r3, [r3]
	ldr	r2, [r6]
	sub	r9, r4, #92
	add	r4, r10, r9
	cmp	r2, r3
	ldr	r3, [r4, #44]
	beq	.L5
.L6:
	str	r3, [r5]
.L7:
	ldr	r3, [r4, #88]
	ldr	r0, [r4, #40]
	str	r3, [r5, #112]
	bl	cpu_to_be16
	str	r0, [r5, #108]
	ldr	r0, [r4, #84]
	bl	cpu_to_be16
	str	r0, [r5, #104]
	ldr	r0, [r4, #52]
	bl	cpu_to_be32
	str	r0, [r5, #100]
	ldr	r0, [r4, #80]
	bl	cpu_to_be16
	ldr	r1, [r4, #36]
	ldr	r2, [r4, #32]
	ldr	r3, [r4, #28]
	str	r0, [r5, #96]
	str	r1, [r5, #92]
	str	r8, [r5, #4]
	str	r2, [r5, #88]
	str	r3, [r5, #84]
	ldr	r0, [r4, #24]
	ldr	r3, [r7]
	blx	r3
	ldr	r2, [r10, r9]
	ldr	r3, [r7, #4]
	orr	r0, r0, r2, lsl #4
	str	r0, [r5, #8]
	ldr	r0, [r4, #24]
	blx	r3
	mov	r8, r0
	mov	r0, r4
	bl	get_linkdowndefaultstate
	cmp	r0, #0
	movne	r2, #1
	moveq	r2, #2
	ldr	r3, [r4, #48]
	ldr	r1, [r4, #4]
	lsl	r8, r8, #4
	ldr	r0, [r4, #8]
	orr	r8, r8, r2
	orr	r1, r1, r3, lsl #6
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #16]
	orr	r2, r2, r0, lsl #4
	cmp	r3, #1024
	str	r8, [r5, #12]
	str	r1, [r5, #16]
	str	r2, [r5, #20]
	beq	.L9
	bgt	.L10
	cmp	r3, #256
	beq	.L11
	cmp	r3, #512
	bne	.L13
	ldr	r3, .L36+4
	ldr	r1, [r3]
.L15:
	ldr	r2, [r4, #56]
	ldr	r3, [r4, #20]
	ldr	r0, [r4, #76]
	orr	r2, r2, r1, lsl #4
	ldr	r1, .L36+8
	lsl	r3, r3, #4
	str	r2, [r5, #24]
	ldr	r1, [r1]
	str	r3, [r5, #28]
	str	r0, [r5, #80]
	ldr	r3, [r7, #8]
	mov	r0, r4
	blx	r3
	ldr	r3, .L36+12
	str	r0, [r5, #32]
	ldr	r1, [r3]
	mov	r0, r4
	ldr	r3, [r7, #8]
	blx	r3
	ldr	r3, .L36+16
	ldr	r2, .L36+20
	ldr	r3, [r3]
	ldr	r1, [r2]
	cmp	r3, #0
	ldreq	r3, .L36+24
	str	r0, [r5, #36]
	ldreq	r3, [r3]
	mov	r0, r4
	str	r3, [r5, #76]
	ldr	r3, [r7, #8]
	blx	r3
	lsl	r0, r0, #4
	str	r0, [r5, #40]
	ldr	r0, [r4, #72]
	bl	cpu_to_be16
	mov	r3, r0
	ldr	r0, [r4, #68]
	str	r3, [r5, #72]
	bl	cpu_to_be16
	mov	r3, r0
	ldr	r0, [r4, #64]
	str	r3, [r5, #68]
	bl	cpu_to_be16
	mov	r2, #3
	ldr	r1, .L36+28
	ldr	r3, [r4, #60]
	ldr	r1, [r1]
	str	r2, [r5, #44]
	str	r3, [r5, #56]
	str	r0, [r5, #64]
	str	r1, [r5, #60]
	mov	r0, r4
	bl	get_phyerrthreshold
	mov	r8, r0
	mov	r0, r4
	bl	get_overrunthreshold
	ldr	r3, .L36+32
	ldr	r2, [r4, #52]
	ldr	r3, [r3]
	orr	r0, r0, r8, lsl #4
	tst	r2, r3
	str	r0, [r5, #48]
	beq	.L17
	ldr	r2, .L36+36
	ldr	r3, [r7, #8]
	ldr	r1, [r2]
	mov	r0, r4
	blx	r3
	ldr	r3, [r5, #52]
	asr	r1, r0, #16
	asr	r2, r0, #8
	stm	r3, {r1, r2}
	str	r0, [r3, #8]
.L17:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	reply
.L10:
	cmp	r3, #2048
	bne	.L13
	ldr	r3, .L36+40
	ldr	r1, [r3]
	b	.L15
.L35:
	mov	r1, r4
	mov	r0, r7
	bl	to_iport
	mov	r2, #0
	mov	r1, r6
	bl	check_mkey
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L36+44
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	mov	r4, r8
	b	.L2
.L5:
	ldr	r2, [r6, #4]
	cmp	r3, r2
	beq	.L6
	ldr	r2, [r4, #48]
	cmp	r2, #1
	bne	.L6
	b	.L7
.L11:
	ldr	r3, .L36+48
	ldr	r1, [r3]
	b	.L15
.L9:
	ldr	r3, .L36+52
	ldr	r1, [r3]
	b	.L15
.L13:
	ldr	r3, .L36+24
	ldr	r1, [r3]
	b	.L15
.L34:
	ldr	r2, .L36+56
	ldr	r3, [r6, #12]
	ldr	r2, [r2]
	mov	r0, r6
	orr	r3, r3, r2
	str	r3, [r6, #12]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	reply
.L37:
	.align	2
.L36:
	.word	IB_MGMT_METHOD_GET
	.word	IB_MTU_512
	.word	QIB_IB_CFG_VL_HIGH_CAP
	.word	QIB_IB_CFG_VL_LOW_CAP
	.word	qib_ibmtu
	.word	QIB_IB_CFG_OP_VLS
	.word	IB_MTU_4096
	.word	QIB_GUIDS_PER_PORT
	.word	IB_PORT_LINK_LATENCY_SUP
	.word	QIB_IB_CFG_LINKLATENCY
	.word	IB_MTU_2048
	.word	IB_MAD_RESULT_FAILURE
	.word	IB_MTU_256
	.word	IB_MTU_1024
	.word	IB_SMP_INVALID_FIELD
.L4:
	.size	subn_get_portinfo, .-subn_get_portinfo
	.comm	qib_ibmtu,4,4
	.comm	QIB_IB_CFG_VL_LOW_CAP,4,4
	.comm	QIB_IB_CFG_VL_HIGH_CAP,4,4
	.comm	QIB_IB_CFG_OP_VLS,4,4
	.comm	QIB_IB_CFG_LINKLATENCY,4,4
	.comm	QIB_GUIDS_PER_PORT,4,4
	.comm	IB_SMP_INVALID_FIELD,4,4
	.comm	IB_PORT_LINK_LATENCY_SUP,4,4
	.comm	IB_MTU_512,4,4
	.comm	IB_MTU_4096,4,4
	.comm	IB_MTU_256,4,4
	.comm	IB_MTU_2048,4,4
	.comm	IB_MTU_1024,4,4
	.comm	IB_MGMT_METHOD_GET,4,4
	.comm	IB_MAD_RESULT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
