	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_query_port                ## -- Begin function qedr_query_port
	.p2align	4, 0x90
_qedr_query_port:                       ## @qedr_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	callq	_get_qedr_dev
	movq	%rax, %r15
	movl	16(%rax), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	movq	24(%r15), %rax
	callq	*(%rax)
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	_QED_RDMA_PORT_UP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_IB_PORT_PHYS_STATE_DISABLED@GOTPCREL(%rip), %rax
	cmoveq	_IB_PORT_PHYS_STATE_LINK_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IB_PORT_DOWN@GOTPCREL(%rip), %rcx
	cmoveq	_IB_PORT_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 92(%rbx)
	movl	%eax, 88(%rbx)
	movq	_IB_MTU_4096@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 84(%rbx)
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_iboe_get_mtu
	movl	%eax, 80(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movups	%xmm0, 64(%rbx)
	movl	$1, (%rbx)
	movl	$1, %r12d
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_rdma_protocol_iwarp
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_QEDR_MAX_SGID@GOTPCREL(%rip), %rax
	movq	_QEDR_ROCE_PKEY_TABLE_LEN@GOTPCREL(%rip), %rcx
	movl	(%rax), %r12d
	movl	(%rcx), %ecx
LBB0_4:
	movl	%r12d, 4(%rbx)
	movl	%ecx, 8(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 40(%rbx)
	movq	$0, 32(%rbx)
	movl	12(%r14), %edi
	leaq	24(%rbx), %rsi
	leaq	20(%rbx), %rdx
	callq	_get_link_speed_and_width
	movl	8(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	$4, 12(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_DP_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rdma_ctx is NULL\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QED_RDMA_PORT_UP,8,3           ## @QED_RDMA_PORT_UP
	.comm	_IB_PORT_ACTIVE,4,2             ## @IB_PORT_ACTIVE
	.comm	_IB_PORT_PHYS_STATE_LINK_UP,4,2 ## @IB_PORT_PHYS_STATE_LINK_UP
	.comm	_IB_PORT_DOWN,4,2               ## @IB_PORT_DOWN
	.comm	_IB_PORT_PHYS_STATE_DISABLED,4,2 ## @IB_PORT_PHYS_STATE_DISABLED
	.comm	_IB_MTU_4096,4,2                ## @IB_MTU_4096
	.comm	_QEDR_MAX_SGID,4,2              ## @QEDR_MAX_SGID
	.comm	_QEDR_ROCE_PKEY_TABLE_LEN,4,2   ## @QEDR_ROCE_PKEY_TABLE_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_query_port                ; -- Begin function qedr_query_port
	.p2align	2
_qedr_query_port:                       ; @qedr_query_port
	.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	x19, x2
	bl	_get_qedr_dev
	mov	x21, x0
	ldr	w0, [x0, #16]
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x21, #24]
	ldr	x8, [x8]
	blr	x8
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _QED_RDMA_PORT_UP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QED_RDMA_PORT_UP@GOTPAGEOFF]
Lloh2:
	adrp	x10, _IB_PORT_PHYS_STATE_LINK_UP@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IB_PORT_PHYS_STATE_LINK_UP@GOTPAGEOFF]
Lloh4:
	adrp	x11, _IB_PORT_PHYS_STATE_DISABLED@GOTPAGE
Lloh5:
	ldr	x11, [x11, _IB_PORT_PHYS_STATE_DISABLED@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _IB_PORT_ACTIVE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IB_PORT_ACTIVE@GOTPAGEOFF]
Lloh9:
	adrp	x10, _IB_PORT_DOWN@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IB_PORT_DOWN@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _IB_MTU_4096@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IB_MTU_4096@GOTPAGEOFF]
	stp	w8, w9, [x19, #88]
Lloh13:
	ldr	w9, [x10]
	str	w9, [x19, #84]
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_iboe_get_mtu
	str	w0, [x19, #80]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19, #48]
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x21
	mov	w1, #1
	bl	_rdma_protocol_iwarp
Lloh14:
	adrp	x8, _QEDR_MAX_SGID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _QEDR_MAX_SGID@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _QEDR_ROCE_PKEY_TABLE_LEN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _QEDR_ROCE_PKEY_TABLE_LEN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	x0, #0
	csinc	w8, w8, wzr, eq
	csinc	w9, w9, wzr, eq
	stp	w8, w9, [x19, #4]
	ldp	w0, w8, [x20, #12]
	str	w8, [x19, #40]
	str	xzr, [x19, #32]
	add	x1, x19, #24
	add	x2, x19, #20
	bl	_get_link_speed_and_width
	mov	w0, #0
	ldr	w8, [x20, #8]
	mov	w9, #4
	stp	w9, w8, [x19, #12]
	b	LBB0_3
LBB0_2:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_DP_ERR
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh6
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rdma_ctx is NULL\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QED_RDMA_PORT_UP,8,3           ; @QED_RDMA_PORT_UP
	.comm	_IB_PORT_ACTIVE,4,2             ; @IB_PORT_ACTIVE
	.comm	_IB_PORT_PHYS_STATE_LINK_UP,4,2 ; @IB_PORT_PHYS_STATE_LINK_UP
	.comm	_IB_PORT_DOWN,4,2               ; @IB_PORT_DOWN
	.comm	_IB_PORT_PHYS_STATE_DISABLED,4,2 ; @IB_PORT_PHYS_STATE_DISABLED
	.comm	_IB_MTU_4096,4,2                ; @IB_MTU_4096
	.comm	_QEDR_MAX_SGID,4,2              ; @QEDR_MAX_SGID
	.comm	_QEDR_ROCE_PKEY_TABLE_LEN,4,2   ; @QEDR_ROCE_PKEY_TABLE_LEN
.subsections_via_symbols
