	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_query_port             ## -- Begin function mlx5_ib_query_port
	.p2align	4, 0x90
_mlx5_ib_query_port:                    ## @mlx5_ib_query_port
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_mlx5_get_vport_access_method
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_mlx5_query_mad_ifc_port
	jmp	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_mlx5_query_port_roce
	jmp	LBB0_4
LBB0_6:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_mlx5_query_hca_port
LBB0_4:
	movl	%eax, %r12d
	testq	%r15, %r15
	jne	LBB0_8
	jmp	LBB0_13
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	testq	%r15, %r15
	je	LBB0_13
LBB0_8:
	testl	%r12d, %r12d
	jne	LBB0_13
## %bb.9:
	movq	%rbx, %rdi
	callq	_to_mdev
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_mlx5_ib_get_native_port_mdev
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rax, %rdi
	callq	_mlx5_core_reserved_gids_count
	movl	%eax, %r13d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mlx5_ib_put_native_port_mdev
	jmp	LBB0_12
LBB0_11:
	movq	(%rbx), %rdi
	callq	_mlx5_core_reserved_gids_count
	movl	%eax, %r13d
LBB0_12:
	subl	%r13d, (%r15)
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_query_port             ; -- Begin function mlx5_ib_query_port
	.p2align	2
_mlx5_ib_query_port:                    ; @mlx5_ib_query_port
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	bl	_mlx5_get_vport_access_method
	cmp	w0, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w0, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w0, #129
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_mlx5_query_mad_ifc_port
	mov	x21, x0
	cbnz	x19, LBB0_7
	b	LBB0_12
LBB0_4:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_mlx5_query_port_roce
	mov	x21, x0
	cbnz	x19, LBB0_7
	b	LBB0_12
LBB0_5:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_mlx5_query_hca_port
	mov	x21, x0
	cbnz	x19, LBB0_7
	b	LBB0_12
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	cbz	x19, LBB0_12
LBB0_7:
	cbnz	w21, LBB0_12
; %bb.8:
	mov	x0, x22
	bl	_to_mdev
	mov	x22, x0
	mov	x1, x20
	mov	x2, #0
	bl	_mlx5_ib_get_native_port_mdev
	cbz	x0, LBB0_10
; %bb.9:
	bl	_mlx5_core_reserved_gids_count
	mov	x23, x0
	mov	x0, x22
	mov	x1, x20
	bl	_mlx5_ib_put_native_port_mdev
	b	LBB0_11
LBB0_10:
	ldr	x0, [x22]
	bl	_mlx5_core_reserved_gids_count
	mov	x23, x0
LBB0_11:
	ldr	w8, [x19]
	sub	w8, w8, w23
	str	w8, [x19]
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
