	.file	"extr_ib_device.c_ib_query_port.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ib_query_port
	.type	ib_query_port, @function
ib_query_port:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	rdma_start_port@PLT
	cmp	rax, r12
	jle	.L2
.L4:
	mov	r13d, DWORD PTR EINVAL[rip]
	neg	r13d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	rdma_end_port@PLT
	cmp	rax, r12
	jl	.L4
	mov	edx, 8
	xor	esi, esi
	mov	rdi, rbx
	call	memset@PLT
	mov	rdx, rbx
	mov	rsi, r12
	mov	rdi, rbp
	call	[QWORD PTR 0[rbp]]
	mov	r13d, eax
	test	eax, eax
	jne	.L1
	cmp	QWORD PTR [rbx], 0
	jne	.L1
	mov	rsi, r12
	mov	rdi, rbp
	call	rdma_port_get_link_layer@PLT
	cmp	rax, QWORD PTR IB_LINK_LAYER_INFINIBAND[rip]
	jne	.L1
	lea	rcx, 4[rsp]
	xor	r8d, r8d
	xor	edx, edx
	mov	rsi, r12
	mov	rdi, rbp
	call	ib_query_gid@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L1
	mov	edi, DWORD PTR 4[rsp]
	call	be64_to_cpu@PLT
	mov	QWORD PTR [rbx], rax
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ib_query_port, .-ib_query_port
	.comm	IB_LINK_LAYER_INFINIBAND,8,8
	.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_ib_device.c_ib_query_port.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ib_query_port
	.syntax unified
	.arm
	.fpu softvfp
	.type	ib_query_port, %function
ib_query_port:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L11
	sub	sp, sp, #20
	mov	r4, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r7, r0
	bl	rdma_start_port
	cmp	r0, r4
	ble	.L2
.L4:
	ldr	r3, .L11+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	mov	r0, r7
	bl	rdma_end_port
	cmp	r0, r4
	blt	.L4
	mov	r3, #0
	strb	r3, [r6]
	strb	r3, [r6, #1]
	strb	r3, [r6, #2]
	strb	r3, [r6, #3]
	mov	r2, r6
	mov	r1, r4
	mov	r0, r7
	ldr	r3, [r7]
	blx	r3
	subs	r5, r0, #0
	bne	.L1
	ldr	r3, [r6]
	cmp	r3, #0
	bne	.L1
	mov	r1, r4
	mov	r0, r7
	bl	rdma_port_get_link_layer
	ldr	r3, .L11+8
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L1
	mov	r2, r5
	str	r5, [sp]
	mov	r1, r4
	mov	r0, r7
	add	r3, sp, #8
	bl	ib_query_gid
	subs	r5, r0, #0
	bne	.L1
	ldr	r0, [sp, #8]
	bl	be64_to_cpu
	str	r0, [r6]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	EINVAL
	.word	IB_LINK_LAYER_INFINIBAND
	.size	ib_query_port, .-ib_query_port
	.comm	IB_LINK_LAYER_INFINIBAND,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
