	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_query_port
_qib_query_port:                        ## @qib_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, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_dd_from_ibdev
	movq	%rax, %r12
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_to_iport
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_ppd_from_ibp
	movq	%rax, %r15
	movq	24(%rax), %r13
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$96, %edx
	callq	_memset
	testq	%r13, %r13
	jne	LBB0_2
## %bb.1:
	movq	_IB_LID_PERMISSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_be16_to_cpu
	movq	%rax, %r13
LBB0_2:
	movq	%r13, 88(%rbx)
	movl	20(%r15), %eax
	movl	%eax, 80(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 76(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 72(%rbx)
	movl	16(%r15), %edi
	callq	*8(%r12)
	movl	%eax, 68(%rbx)
	movl	16(%r15), %edi
	callq	*(%r12)
	movl	%eax, 64(%rbx)
	movl	12(%r14), %eax
	movl	%eax, 60(%rbx)
	movq	_QIB_GUIDS_PER_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movl	$-2147483648, (%rbx)            ## imm = 0x80000000
	movq	%r12, %rdi
	callq	_qib_get_npkeys
	movl	%eax, 52(%rbx)
	movsd	4(%r14), %xmm0                  ## xmm0 = mem[0],zero
	movsd	8(%r15), %xmm1                  ## xmm1 = mem[0],zero
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, 36(%rbx)
	movl	4(%r15), %edi
	callq	_qib_num_vls
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	_qib_ibmtu@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	movq	_IB_MTU_4096@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmoveq	%rax, %rcx
	movq	%rcx, 16(%rbx)
	movl	(%r15), %ecx
	cmpl	$1023, %ecx                     ## imm = 0x3FF
	jle	LBB0_3
## %bb.6:
	cmpl	$1024, %ecx                     ## imm = 0x400
	je	LBB0_10
## %bb.7:
	cmpl	$2048, %ecx                     ## imm = 0x800
	je	LBB0_9
## %bb.8:
	cmpl	$4096, %ecx                     ## imm = 0x1000
	je	LBB0_13
	jmp	LBB0_9
LBB0_3:
	cmpl	$256, %ecx                      ## imm = 0x100
	je	LBB0_11
## %bb.4:
	cmpl	$512, %ecx                      ## imm = 0x200
	jne	LBB0_9
## %bb.5:
	movq	_IB_MTU_512@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	movq	_IB_MTU_2048@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, 4(%rbx)
	movl	(%r14), %eax
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_LID_PERMISSIVE,4,2          ## @IB_LID_PERMISSIVE
	.comm	_QIB_GUIDS_PER_PORT,4,2         ## @QIB_GUIDS_PER_PORT
	.comm	_qib_ibmtu,8,3                  ## @qib_ibmtu
	.comm	_IB_MTU_4096,8,3                ## @IB_MTU_4096
	.comm	_IB_MTU_2048,4,2                ## @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	_qib_query_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_query_port
_qib_query_port:                        ; @qib_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	x21, x0
	bl	_dd_from_ibdev
	mov	x22, x0
	mov	x0, x21
	mov	x1, x20
	bl	_to_iport
	mov	x20, x0
	bl	_ppd_from_ibp
	mov	x21, x0
	ldr	x23, [x0, #24]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #96
	bl	_memset
	cbnz	x23, 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	x23, x0
LBB0_2:
	str	x23, [x19, #88]
	ldr	w8, [x21, #20]
	str	w8, [x19, #80]
	ldr	d0, [x20, #16]
	str	d0, [x19, #72]
	ldr	x8, [x22, #8]
	ldr	w0, [x21, #16]
	blr	x8
	str	w0, [x19, #68]
	ldr	x8, [x22]
	ldr	w0, [x21, #16]
	blr	x8
	str	w0, [x19, #64]
Lloh3:
	adrp	x8, _QIB_GUIDS_PER_PORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QIB_GUIDS_PER_PORT@GOTPAGEOFF]
	ldr	w9, [x20, #12]
Lloh5:
	ldr	w8, [x8]
	stp	w8, w9, [x19, #56]
	mov	w8, #-2147483648
	str	w8, [x19]
	mov	x0, x22
	bl	_qib_get_npkeys
	str	w0, [x19, #52]
	ldur	d0, [x20, #4]
	ldr	d1, [x21, #8]
	mov.d	v1[1], v0[0]
	stur	q1, [x19, #36]
	ldr	w0, [x21, #4]
	bl	_qib_num_vls
	str	w0, [x19, #32]
Lloh6:
	adrp	x8, _qib_ibmtu@GOTPAGE
Lloh7:
	ldr	x8, [x8, _qib_ibmtu@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x8]
Lloh9:
	adrp	x8, _IB_MTU_4096@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IB_MTU_4096@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x9, #0
	csel	x9, x8, x9, eq
	stp	x9, xzr, [x19, #16]
	ldr	w9, [x21]
	cmp	w9, #1023
	b.le	LBB0_6
; %bb.3:
	cmp	w9, #1024
	b.eq	LBB0_10
; %bb.4:
	cmp	w9, #2048
	b.eq	LBB0_9
; %bb.5:
	cmp	w9, #1, lsl #12                 ; =4096
	b.eq	LBB0_13
	b	LBB0_9
LBB0_6:
	cmp	w9, #256
	b.eq	LBB0_11
; %bb.7:
	cmp	w9, #512
	b.ne	LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _IB_MTU_512@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IB_MTU_512@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh14:
	adrp	x8, _IB_MTU_2048@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_MTU_2048@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh16:
	adrp	x8, _IB_MTU_1024@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IB_MTU_1024@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh18:
	adrp	x8, _IB_MTU_256@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IB_MTU_256@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
LBB0_13:
	ldr	w9, [x20]
	stp	w8, w9, [x19, #4]
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_LID_PERMISSIVE,4,2          ; @IB_LID_PERMISSIVE
	.comm	_QIB_GUIDS_PER_PORT,4,2         ; @QIB_GUIDS_PER_PORT
	.comm	_qib_ibmtu,8,3                  ; @qib_ibmtu
	.comm	_IB_MTU_4096,8,3                ; @IB_MTU_4096
	.comm	_IB_MTU_2048,4,2                ; @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	_qib_query_port
.subsections_via_symbols
