	.file	"extr_mlx4_ib_main.c_mlx4_ib_gid_index_to_real_index.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mlx4_ib_gid_index_to_real_index
	.type	mlx4_ib_gid_index_to_real_index, @function
mlx4_ib_gid_index_to_real_index:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsx	rbx, esi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	neg	r12d
	cmp	DWORD PTR MLX4_MAX_PORTS[rip], ebx
	jge	.L21
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 56
	.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
.L21:
	.cfi_restore_state
	mov	r14, rdi
	mov	edi, DWORD PTR 4[rdi]
	mov	r13d, edx
	call	mlx4_is_bonded@PLT
	mov	rdi, r14
	test	rax, rax
	mov	eax, 1
	cmovne	rbx, rax
	mov	esi, ebx
	call	rdma_cap_roce_gid_table@PLT
	test	eax, eax
	je	.L11
	lea	rbp, 12[rsp]
	lea	r8, 16[rsp]
	mov	edx, r13d
	mov	esi, ebx
	mov	rcx, rbp
	mov	rdi, r14
	call	ib_get_cached_gid@PLT
	test	eax, eax
	jne	.L12
	mov	rdi, QWORD PTR 24[rsp]
	test	rdi, rdi
	jne	.L23
.L4:
	mov	edx, 4
	lea	rsi, zgid[rip]
	mov	rdi, rbp
	call	memcmp@PLT
	test	eax, eax
	jne	.L5
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r12d, r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	lea	r13, 8[r14]
	xor	esi, esi
	mov	rdi, r13
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR 16[r14]
	lea	r14, -8[rax+rbx*8]
	mov	eax, DWORD PTR MLX4_MAX_PORT_GIDS[rip]
	test	eax, eax
	jle	.L6
	xor	r15d, r15d
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR [r14]
	lea	rbx, [r15+r15*2]
	mov	edx, 4
	mov	rsi, rbp
	sal	rbx, 3
	add	rdi, rbx
	add	rdi, 16
	call	memcmp@PLT
	test	eax, eax
	jne	.L7
	add	rbx, QWORD PTR [r14]
	mov	rax, QWORD PTR [rbx]
	cmp	QWORD PTR 16[rsp], rax
	je	.L24
.L7:
	add	r15, 1
	cmp	DWORD PTR MLX4_MAX_PORT_GIDS[rip], r15d
	jg	.L9
.L6:
	xor	esi, esi
	mov	rdi, r13
	call	spin_unlock_irqrestore@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	je	.L6
	mov	r12d, DWORD PTR [rax]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
	call	dev_put@PLT
	jmp	.L4
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mlx4_ib_gid_index_to_real_index, .-mlx4_ib_gid_index_to_real_index
	.comm	zgid,4,4
	.comm	MLX4_MAX_PORT_GIDS,4,4
	.comm	MLX4_MAX_PORTS,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_mlx4_ib_main.c_mlx4_ib_gid_index_to_real_index.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mlx4_ib_gid_index_to_real_index
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_ib_gid_index_to_real_index, %function
mlx4_ib_gid_index_to_real_index:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L25
	ldr	r8, .L25+4
	ldr	r3, [r3]
	ldr	r5, [r8]
	cmp	r3, r1
	ldr	r3, .L25+8
	sub	sp, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	rsb	r5, r5, #0
	bge	.L21
.L1:
	ldr	r3, .L25+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L21:
	mov	r6, r0
	ldr	r0, [r0, #4]
	mov	r4, r1
	mov	r7, r2
	bl	mlx4_is_bonded
	cmp	r0, #0
	movne	r4, #1
	mov	r0, r6
	mov	r1, r4
	bl	rdma_cap_roce_gid_table
	cmp	r0, #0
	beq	.L12
	add	r1, sp, #12
	mov	r2, r7
	str	r1, [sp]
	mov	r0, r6
	mov	r1, r4
	add	r3, sp, #8
	bl	ib_get_cached_gid
	subs	r7, r0, #0
	bne	.L12
	ldr	r0, [sp, #16]
	cmp	r0, #0
	bne	.L23
.L4:
	mov	r2, #4
	ldr	r1, .L25+12
	add	r0, sp, #8
	bl	memcmp
	cmp	r0, #0
	bne	.L5
	ldr	r5, [r8]
	rsb	r5, r5, #0
	b	.L1
.L12:
	mov	r5, r7
	b	.L1
.L5:
	add	r8, r6, #8
	mov	r0, r8
	mov	r1, #0
	bl	spin_lock_irqsave
	ldr	r3, .L25+16
	sub	r4, r4, #-1073741823
	ldr	r9, [r3]
	ldr	r3, [r6, #12]
	cmp	r9, #0
	ble	.L6
	ldr	r4, [r3, r4, lsl #2]
	ldr	r6, [sp, #12]
	add	r4, r4, #8
.L9:
	mov	r2, #4
	mov	r0, r4
	add	r1, sp, #8
	bl	memcmp
	cmp	r0, #0
	bne	.L7
	ldr	r2, [r4, #-8]
	cmp	r6, r2
	beq	.L24
.L7:
	add	r7, r7, #1
	cmp	r7, r9
	add	r4, r4, #12
	bne	.L9
.L6:
	mov	r0, r8
	mov	r1, #0
	bl	spin_unlock_irqrestore
	b	.L1
.L24:
	ldr	r3, [r4, #-4]
	cmp	r3, #0
	ldrne	r5, [r3]
	b	.L6
.L23:
	bl	dev_put
	b	.L4
.L22:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	MLX4_MAX_PORTS
	.word	EINVAL
	.word	.LC0
	.word	zgid
	.word	MLX4_MAX_PORT_GIDS
	.size	mlx4_ib_gid_index_to_real_index, .-mlx4_ib_gid_index_to_real_index
	.comm	zgid,4,4
	.comm	MLX4_MAX_PORT_GIDS,4,4
	.comm	MLX4_MAX_PORTS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
