	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_gid_index_to_real_index ## -- Begin function mlx4_ib_gid_index_to_real_index
	.p2align	4, 0x90
_mlx4_ib_gid_index_to_real_index:       ## @mlx4_ib_gid_index_to_real_index
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %ebx
	movq	_MLX4_MAX_PORTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_12
## %bb.1:
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	callq	_mlx4_is_bonded
	testq	%rax, %rax
	movl	$1, %r14d
	cmovel	%ebx, %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_rdma_cap_roce_gid_table
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_MLX4_MAX_PORT_GIDS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_11
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	decl	%r14d
	movslq	%r14d, %r14
	movq	16(%r12), %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	16(%rax), %r12
	movl	$16, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	movq	_MLX4_MAX_PORT_GIDS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$24, %r15
	cmpq	%rax, %r13
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%r14,8), %rdi
	addq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcmp
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rcx
	movq	(%rbx,%r14,8), %rax
	cmpq	-16(%rax,%r15), %rcx
	jne	LBB0_7
## %bb.9:
	movq	-8(%rax,%r15), %rax
	testq	%rax, %rax
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	movl	(%rax), %r15d
	jmp	LBB0_11
LBB0_2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %r15d
	jmp	LBB0_12
LBB0_8:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_12:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MLX4_MAX_PORTS,4,2             ## @MLX4_MAX_PORTS
	.comm	_MLX4_MAX_PORT_GIDS,4,2         ## @MLX4_MAX_PORT_GIDS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_gid_index_to_real_index ; -- Begin function mlx4_ib_gid_index_to_real_index
	.p2align	2
_mlx4_ib_gid_index_to_real_index:       ; @mlx4_ib_gid_index_to_real_index
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	ldr	w21, [x1]
Lloh3:
	adrp	x8, _MLX4_MAX_PORTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_MAX_PORTS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w21, w8
	b.gt	LBB0_11
; %bb.1:
	mov	x20, x1
	mov	x22, x0
	ldr	w0, [x0, #4]
	bl	_mlx4_is_bonded
	cmp	x0, #0
	csinc	w23, w21, wzr, eq
	mov	x0, x22
	mov	x1, x23
	bl	_rdma_cap_roce_gid_table
	cbz	w0, LBB0_10
; %bb.2:
	add	x21, x22, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh6:
	adrp	x24, _MLX4_MAX_PORT_GIDS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _MLX4_MAX_PORT_GIDS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x25, #0
	mov	x26, #0
	sxtw	x8, w23
	sub	x23, x8, #1
	ldr	x27, [x22, #16]
	add	x22, x20, #16
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x24]
	add	x25, x25, #24
	cmp	x26, x8
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27, x23, lsl #3]
	add	x8, x8, x25
	add	x0, x8, #16
	mov	x1, x22
	mov	w2, #4
	bl	_memcmp
	cbnz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20, #8]
	ldr	x8, [x27, x23, lsl #3]
	ldr	x10, [x8, x25]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.7:
	add	x8, x8, x25
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w19, [x8]
LBB0_9:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_11
LBB0_10:
	ldr	w19, [x20, #4]
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MLX4_MAX_PORTS,4,2             ; @MLX4_MAX_PORTS
	.comm	_MLX4_MAX_PORT_GIDS,4,2         ; @MLX4_MAX_PORT_GIDS
.subsections_via_symbols
