	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_get_native_port_mdev   ## -- Begin function mlx5_ib_get_native_port_mdev
	.p2align	4, 0x90
_mlx5_ib_get_native_port_mdev:          ## @mlx5_ib_get_native_port_mdev
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	addq	$16, %rdi
	callq	_mlx5_ib_port_link_layer
	movl	%eax, %r12d
	movq	8(%rbx), %rdi
	callq	_mlx5_core_mp_enabled
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	_IB_LINK_LAYER_ETHERNET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_8
## %bb.2:
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movl	$1, (%r15)
LBB0_4:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movslq	%r14d, %r15
	shlq	$4, %r15
	leaq	(%rax,%r15), %r14
	addq	$-16, %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	(%rbx), %rax
	movq	-8(%rax,%r15), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	cmpl	$0, 16(%rax)
	je	LBB0_13
LBB0_12:
	xorl	%ebx, %ebx
LBB0_15:
	movq	%r14, %rdi
	callq	_spin_unlock
	jmp	LBB0_16
LBB0_8:
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movl	%r14d, (%r15)
LBB0_10:
	movq	8(%rbx), %rbx
	jmp	LBB0_16
LBB0_11:
	xorl	%ebx, %ebx
LBB0_16:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	8(%rax), %rbx
	cmpl	$0, 4(%rax)
	jne	LBB0_15
## %bb.14:
	incl	(%rax)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_LINK_LAYER_ETHERNET,4,2     ## @IB_LINK_LAYER_ETHERNET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_get_native_port_mdev   ; -- Begin function mlx5_ib_get_native_port_mdev
	.p2align	2
_mlx5_ib_get_native_port_mdev:          ; @mlx5_ib_get_native_port_mdev
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	add	x0, x0, #16
	bl	_mlx5_ib_port_link_layer
	mov	x22, x0
	ldr	x0, [x19, #8]
	bl	_mlx5_core_mp_enabled
Lloh0:
	adrp	x8, _IB_LINK_LAYER_ETHERNET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_LINK_LAYER_ETHERNET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #0
	ccmp	w22, w8, #0, ne
	b.eq	LBB0_4
; %bb.1:
	cbz	x21, LBB0_3
; %bb.2:
	str	w20, [x21]
LBB0_3:
	ldr	x19, [x19, #8]
	b	LBB0_12
LBB0_4:
	cbz	x21, LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x21]
LBB0_6:
	ldr	x8, [x19]
	cbz	x8, LBB0_11
; %bb.7:
	sbfiz	x9, x20, #4, #32
	sub	x21, x9, #16
	add	x20, x8, x21
	mov	x0, x20
	bl	_spin_lock
	ldr	x8, [x19]
	add	x8, x8, x21
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w9, [x8, #16]
	cbz	w9, LBB0_13
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x20
	bl	_spin_unlock
	b	LBB0_12
LBB0_11:
	mov	x19, #0
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	x19, [x8, #8]
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_10
; %bb.14:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_LINK_LAYER_ETHERNET,4,2     ; @IB_LINK_LAYER_ETHERNET
.subsections_via_symbols
