	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipath_query_port
_ipath_query_port:                      ## @ipath_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	_to_idev
	movq	%rax, %r14
	movq	32(%rax), %r15
	movq	32(%r15), %r12
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$112, %edx
	callq	_memset
	testq	%r12, %r12
	jne	LBB0_2
## %bb.1:
	movq	_IB_LID_PERMISSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_be16_to_cpu
	movq	%rax, %r12
LBB0_2:
	movq	%r12, 104(%rbx)
	movl	28(%r15), %eax
	movl	%eax, 96(%rbx)
	movl	24(%r14), %eax
	movl	%eax, 92(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 88(%rbx)
	movq	(%r15), %rsi
	movq	%r15, %rdi
	callq	_ipath_ib_linkstate
	incq	%rax
	movq	%rax, 80(%rbx)
	movq	_ipath_cvt_physportstate@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	andq	(%r15), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 72(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 68(%rbx)
	movabsq	$-9223372036854775807, %rax     ## imm = 0x8000000000000001
	movq	%rax, (%rbx)
	movq	%r15, %rdi
	callq	_ipath_get_npkeys
	movl	%eax, 64(%rbx)
	movq	%r15, %rdi
	callq	_ipath_get_cr_errpkey
	subq	8(%r14), %rax
	movq	%rax, 56(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 48(%rbx)
	movl	24(%r15), %eax
	movl	%eax, 44(%rbx)
	movl	20(%r15), %eax
	movl	%eax, 40(%rbx)
	movl	$1, 8(%rbx)
	movq	$0, 32(%rbx)
	movq	_ipath_mtu4096@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_IB_MTU_4096@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_IB_MTU_2048@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, %rdx
	cmoveq	%rax, %rdx
	movq	%rdx, 24(%rbx)
	movl	16(%r15), %edx
	cmpl	$1023, %edx                     ## imm = 0x3FF
	jle	LBB0_3
## %bb.6:
	cmpl	$1024, %edx                     ## imm = 0x400
	je	LBB0_10
## %bb.7:
	cmpl	$2048, %edx                     ## imm = 0x800
	je	LBB0_13
## %bb.8:
	cmpl	$4096, %edx                     ## imm = 0x1000
	jne	LBB0_13
## %bb.9:
	movl	%ecx, %eax
	jmp	LBB0_13
LBB0_3:
	cmpl	$256, %edx                      ## imm = 0x100
	je	LBB0_11
## %bb.4:
	cmpl	$512, %edx                      ## imm = 0x200
	jne	LBB0_13
## %bb.5:
	movq	_IB_MTU_512@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_IB_MTU_1024@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_IB_MTU_256@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
LBB0_13:
	movl	%eax, 12(%rbx)
	movl	(%r14), %eax
	movl	%eax, 16(%rbx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_LID_PERMISSIVE,4,2          ## @IB_LID_PERMISSIVE
	.comm	_ipath_cvt_physportstate,8,3    ## @ipath_cvt_physportstate
	.comm	_ipath_mtu4096,8,3              ## @ipath_mtu4096
	.comm	_IB_MTU_4096,8,3                ## @IB_MTU_4096
	.comm	_IB_MTU_2048,8,3                ## @IB_MTU_2048
	.comm	_IB_MTU_1024,4,2                ## @IB_MTU_1024
	.comm	_IB_MTU_512,4,2                 ## @IB_MTU_512
	.comm	_IB_MTU_256,4,2                 ## @IB_MTU_256
	.no_dead_strip	_ipath_query_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ipath_query_port
lCPI0_0:
	.long	1                               ; 0x1
	.long	2147483648                      ; 0x80000000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ipath_query_port:                      ; @ipath_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	_to_idev
	mov	x20, x0
	ldr	x21, [x0, #32]
	ldr	x22, [x21, #32]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #112
	bl	_memset
	cbnz	x22, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IB_LID_PERMISSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_LID_PERMISSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_be16_to_cpu
	mov	x22, x0
LBB0_2:
	str	x22, [x19, #104]
	ldr	w8, [x21, #28]
	str	w8, [x19, #96]
	ldur	d0, [x20, #20]
	str	d0, [x19, #88]
	ldr	x1, [x21]
	mov	x0, x21
	bl	_ipath_ib_linkstate
	add	x8, x0, #1
	str	x8, [x19, #80]
Lloh3:
	adrp	x8, _ipath_cvt_physportstate@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ipath_cvt_physportstate@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldp	x9, x10, [x21]
	and	x9, x10, x9
	ldr	w8, [x8, x9, lsl #2]
	ldr	w9, [x20, #16]
	stp	w9, w8, [x19, #68]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	mov	x0, x21
	bl	_ipath_get_npkeys
	str	w0, [x19, #64]
	mov	x0, x21
	bl	_ipath_get_cr_errpkey
	ldr	x8, [x20, #8]
	sub	x8, x0, x8
	str	x8, [x19, #56]
	ldr	w8, [x20, #4]
	str	w8, [x19, #48]
	ldur	d0, [x21, #20]
	str	d0, [x19, #40]
	mov	w8, #1
	str	w8, [x19, #8]
Lloh8:
	adrp	x8, _ipath_mtu4096@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ipath_mtu4096@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x8]
Lloh11:
	adrp	x8, _IB_MTU_4096@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_MTU_4096@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x8]
Lloh14:
	adrp	x8, _IB_MTU_2048@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_MTU_2048@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x10, #0
	csel	x10, x8, x9, eq
	stp	x10, xzr, [x19, #24]
	ldr	w10, [x21, #16]
	cmp	w10, #1023
	b.le	LBB0_7
; %bb.3:
	cmp	w10, #1024
	b.eq	LBB0_10
; %bb.4:
	cmp	w10, #2048
	b.eq	LBB0_13
; %bb.5:
	cmp	w10, #1, lsl #12                ; =4096
	b.ne	LBB0_13
; %bb.6:
	mov	x8, x9
	b	LBB0_13
LBB0_7:
	cmp	w10, #256
	b.eq	LBB0_11
; %bb.8:
	cmp	w10, #512
	b.ne	LBB0_13
; %bb.9:
Lloh17:
	adrp	x8, _IB_MTU_512@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IB_MTU_512@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh19:
	adrp	x8, _IB_MTU_1024@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IB_MTU_1024@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh21:
	adrp	x8, _IB_MTU_256@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IB_MTU_256@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
LBB0_13:
	ldr	w9, [x20]
	stp	w8, w9, [x19, #12]
	mov	w0, #0
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_LID_PERMISSIVE,4,2          ; @IB_LID_PERMISSIVE
	.comm	_ipath_cvt_physportstate,8,3    ; @ipath_cvt_physportstate
	.comm	_ipath_mtu4096,8,3              ; @ipath_mtu4096
	.comm	_IB_MTU_4096,8,3                ; @IB_MTU_4096
	.comm	_IB_MTU_2048,8,3                ; @IB_MTU_2048
	.comm	_IB_MTU_1024,4,2                ; @IB_MTU_1024
	.comm	_IB_MTU_512,4,2                 ; @IB_MTU_512
	.comm	_IB_MTU_256,4,2                 ; @IB_MTU_256
	.no_dead_strip	_ipath_query_port
.subsections_via_symbols
