	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_query_port                  ## -- Begin function ib_query_port
	.p2align	4, 0x90
_ib_query_port:                         ## @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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_rdma_start_port
	cmpq	%r15, %rax
	jg	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_rdma_end_port
	cmpq	%r15, %rax
	jge	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	*(%rbx)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	cmpq	$0, (%r14)
	je	LBB0_5
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_rdma_port_get_link_layer
	movq	%rax, %rcx
	movq	_IB_LINK_LAYER_INFINIBAND@GOTPCREL(%rip), %rdx
	movl	$0, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.6:
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_ib_query_gid
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movl	-32(%rbp), %edi
	callq	_be64_to_cpu
	movq	%rax, (%r14)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_LINK_LAYER_INFINIBAND,8,3   ## @IB_LINK_LAYER_INFINIBAND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_query_port                  ; -- Begin function ib_query_port
	.p2align	2
_ib_query_port:                         ; @ib_query_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_rdma_start_port
	cmp	x0, x20
	b.gt	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_rdma_end_port
	cmp	x0, x20
	b.ge	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #64
	ret
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x21]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	blr	x8
	cbnz	w0, LBB0_3
; %bb.5:
	ldr	x8, [x19]
	cbnz	x8, LBB0_9
; %bb.6:
	mov	x0, x21
	mov	x1, x20
	bl	_rdma_port_get_link_layer
Lloh3:
	adrp	x8, _IB_LINK_LAYER_INFINIBAND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_LINK_LAYER_INFINIBAND@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	mov	x4, #0
	bl	_ib_query_gid
	cbnz	w0, LBB0_3
; %bb.8:
	ldr	w0, [sp, #8]
	bl	_be64_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_3
LBB0_9:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_LINK_LAYER_INFINIBAND,8,3   ; @IB_LINK_LAYER_INFINIBAND
.subsections_via_symbols
