	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_link_query_port
_ib_link_query_port:                    ## @ib_link_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_MLX4_MAD_IFC_IGNORE_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %r15
	movl	(%rbx), %esi
	movl	$24, %edi
	callq	_kmalloc
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_20
## %bb.1:
	testq	%r14, %r14
	je	LBB0_20
## %bb.2:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_init_query_mad
	movq	_IB_SMP_ATTR_PORT_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_cpu_to_be32
	movq	%rax, 8(%r15)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_to_mdev
	movq	(%rax), %rdi
	callq	_mlx4_is_mfunc
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MLX4_MAD_IFC_NET_VIEW@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	cmovel	%eax, %ebx
	orl	%r12d, %ebx
	movq	%r13, %rdi
	callq	_to_mdev
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, (%rsp)
	movq	%rax, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	movq	%r13, %r14
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_mlx4_MAD_IFC
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_5
LBB0_20:
	movq	%r15, %rdi
	callq	_kfree
	movq	%r14, %rdi
	callq	_kfree
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rdi
	addq	$64, %rdi
	callq	_be16_to_cpup
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 88(%rbx)
	movq	(%r14), %rdi
	movl	136(%rdi), %eax
	andl	$7, %eax
	movl	%eax, (%rbx)
	addq	$72, %rdi
	callq	_be16_to_cpup
	movq	%rax, 80(%rbx)
	movq	(%r14), %rdi
	movl	144(%rdi), %eax
	andl	$15, %eax
	movl	%eax, 4(%rbx)
	movl	128(%rdi), %eax
	andl	$15, %eax
	movl	%eax, 8(%rbx)
	movl	132(%rdi), %eax
	sarl	$4, %eax
	movl	%eax, 12(%rbx)
	addq	$80, %rdi
	callq	_be32_to_cpup
	movl	%eax, 16(%rbx)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:
	movl	$50, %ecx
	movq	%r14, %rax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_7:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_to_mdev
	movq	(%rax), %rax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rcx
LBB0_8:
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 20(%rbx)
	movq	%r13, %rdi
	callq	_to_mdev
	movq	(%rax), %rax
	movl	16(%rax), %eax
	movl	%eax, 76(%rbx)
	movq	%r13, %rdi
	callq	_to_mdev
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	(%rax,%r12,4), %eax
	movl	%eax, 72(%rbx)
	movl	$184, %edi
	addq	(%r14), %rdi
	callq	_be16_to_cpup
	movq	%rax, 64(%rbx)
	movl	$192, %edi
	addq	(%r14), %rdi
	callq	_be16_to_cpup
	movq	%rax, 56(%rbx)
	movq	(%r14), %rcx
	movl	124(%rcx), %eax
	andl	$15, %eax
	movl	%eax, 24(%rbx)
	movl	140(%rcx), %eax
	sarl	$4, %eax
	movl	%eax, 28(%rbx)
	movl	164(%rcx), %edx
	andl	$15, %edx
	movl	%edx, 32(%rbx)
	movl	144(%rcx), %edx
	sarl	$4, %edx
	movl	%edx, 36(%rbx)
	movl	204(%rcx), %edx
	andl	$31, %edx
	movl	%edx, 40(%rbx)
	movl	148(%rcx), %edx
	sarl	$4, %edx
	movl	%edx, 44(%rbx)
	movl	164(%rcx), %edx
	sarl	$4, %edx
	movl	%edx, 48(%rbx)
	movq	_IB_PORT_EXTENDED_SPEEDS_SUP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 16(%rbx)
	je	LBB0_14
## %bb.9:
	movl	248(%rcx), %ecx
	sarl	$4, %ecx
	cmpl	$1, %ecx
	je	LBB0_10
## %bb.11:
	cmpl	$2, %ecx
	jne	LBB0_14
## %bb.12:
	movq	_IB_SPEED_EDR@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_IB_SPEED_FDR@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
LBB0_14:
	movq	_IB_SPEED_QDR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.15:
	movq	%r15, %rdi
	callq	_init_query_mad
	movq	_MLX4_ATTR_EXTENDED_PORT_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	%r12, %rdi
	callq	_cpu_to_be32
	movq	%rax, 8(%r15)
	movq	%r13, %rdi
	callq	_to_mdev
	movq	%r14, (%rsp)
	movq	%rax, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_mlx4_MAD_IFC
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:
	movq	(%r14), %rax
	testb	$1, 60(%rax)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_18
## %bb.17:
	movq	_IB_SPEED_FDR10@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
LBB0_18:
	movl	8(%rbx), %eax
	movq	_IB_PORT_DOWN@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	cmpl	(%rcx), %eax
	jne	LBB0_20
## %bb.19:
	movq	_IB_SPEED_SDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_MAD_IFC_IGNORE_KEYS,4,2   ## @MLX4_MAD_IFC_IGNORE_KEYS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IB_SMP_ATTR_PORT_INFO,4,2      ## @IB_SMP_ATTR_PORT_INFO
	.comm	_MLX4_MAD_IFC_NET_VIEW,4,2      ## @MLX4_MAD_IFC_NET_VIEW
	.comm	_IB_PORT_EXTENDED_SPEEDS_SUP,4,2 ## @IB_PORT_EXTENDED_SPEEDS_SUP
	.comm	_IB_SPEED_FDR,4,2               ## @IB_SPEED_FDR
	.comm	_IB_SPEED_EDR,4,2               ## @IB_SPEED_EDR
	.comm	_IB_SPEED_QDR,4,2               ## @IB_SPEED_QDR
	.comm	_MLX4_ATTR_EXTENDED_PORT_INFO,4,2 ## @MLX4_ATTR_EXTENDED_PORT_INFO
	.comm	_IB_SPEED_FDR10,4,2             ## @IB_SPEED_FDR10
	.comm	_IB_PORT_DOWN,4,2               ## @IB_PORT_DOWN
	.comm	_IB_SPEED_SDR,4,2               ## @IB_SPEED_SDR
	.no_dead_strip	_ib_link_query_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_link_query_port
_ib_link_query_port:                    ; @ib_link_query_port
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x25, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _MLX4_MAD_IFC_IGNORE_KEYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_MAD_IFC_IGNORE_KEYS@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
Lloh6:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	ldr	w1, [x21]
	mov	w0, #24
	bl	_kmalloc
	mov	x21, x0
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	neg	w26, w26
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_init_query_mad
Lloh8:
	adrp	x8, _IB_SMP_ATTR_PORT_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_SMP_ATTR_PORT_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x22
	bl	_cpu_to_be32
	str	x0, [x19, #8]
	mov	x0, x23
	bl	_to_mdev
	ldr	x0, [x0]
	bl	_mlx4_is_mfunc
	cmp	x0, #0
	ccmp	w25, #0, #4, ne
Lloh11:
	adrp	x8, _MLX4_MAD_IFC_NET_VIEW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLX4_MAD_IFC_NET_VIEW@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	csel	w8, w8, wzr, ne
	orr	w24, w8, w24
	mov	x0, x23
	bl	_to_mdev
	mov	x1, x24
	mov	x2, x22
	mov	x3, #0
	mov	x4, #0
	mov	x5, x19
	mov	x6, x21
	bl	_mlx4_MAD_IFC
	mov	x26, x0
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	bl	_kfree
	mov	x0, x26
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x8, [x21]
	add	x0, x8, #64
	bl	_be16_to_cpup
	str	x0, [x20, #88]
	ldr	x8, [x21]
	ldr	w9, [x8, #136]
	and	w9, w9, #0x7
	str	w9, [x20]
	add	x0, x8, #72
	bl	_be16_to_cpup
	str	x0, [x20, #80]
	ldr	x8, [x21]
	ldr	w9, [x8, #144]
	and	w9, w9, #0xf
	str	w9, [x20, #4]
	ldr	w9, [x8, #128]
	and	w9, w9, #0xf
	str	w9, [x20, #8]
	ldr	w9, [x8, #132]
	asr	w9, w9, #4
	str	w9, [x20, #12]
	add	x0, x8, #80
	bl	_be32_to_cpup
	str	w0, [x20, #16]
	cbz	w25, LBB0_6
; %bb.5:
	mov	w9, #50
	mov	x8, x21
	b	LBB0_7
LBB0_6:
	mov	x0, x23
	bl	_to_mdev
	ldr	x8, [x0]
	mov	x9, x22
LBB0_7:
	ldr	x8, [x8]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x20, #20]
	mov	x0, x23
	bl	_to_mdev
	ldr	x8, [x0]
	ldr	w8, [x8, #16]
	str	w8, [x20, #76]
	mov	x0, x23
	bl	_to_mdev
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	ldr	w8, [x8, x22, lsl #2]
	str	w8, [x20, #72]
	ldr	x8, [x21]
	add	x0, x8, #184
	bl	_be16_to_cpup
	str	x0, [x20, #64]
	ldr	x8, [x21]
	add	x0, x8, #192
	bl	_be16_to_cpup
	str	x0, [x20, #56]
	ldr	x9, [x21]
	ldr	w8, [x9, #124]
	and	w8, w8, #0xf
	str	w8, [x20, #24]
	ldr	w8, [x9, #140]
	asr	w8, w8, #4
	str	w8, [x20, #28]
	ldr	w10, [x9, #164]
	and	w10, w10, #0xf
	str	w10, [x20, #32]
	ldr	w10, [x9, #144]
	asr	w10, w10, #4
	str	w10, [x20, #36]
	ldr	w10, [x9, #204]
	and	w10, w10, #0x1f
	str	w10, [x20, #40]
	ldr	w10, [x9, #148]
	asr	w10, w10, #4
	str	w10, [x20, #44]
	ldr	w10, [x9, #164]
	asr	w10, w10, #4
	str	w10, [x20, #48]
	ldr	w10, [x20, #16]
Lloh14:
	adrp	x11, _IB_PORT_EXTENDED_SPEEDS_SUP@GOTPAGE
Lloh15:
	ldr	x11, [x11, _IB_PORT_EXTENDED_SPEEDS_SUP@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_13
; %bb.8:
	ldr	w9, [x9, #248]
	asr	w9, w9, #4
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.9:
	cmp	w9, #2
	b.ne	LBB0_13
; %bb.10:
Lloh17:
	adrp	x8, _IB_SPEED_EDR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IB_SPEED_EDR@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh19:
	adrp	x8, _IB_SPEED_FDR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IB_SPEED_FDR@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [x20, #28]
LBB0_13:
Lloh21:
	adrp	x9, _IB_SPEED_QDR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IB_SPEED_QDR@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.14:
	mov	x0, x19
	bl	_init_query_mad
Lloh24:
	adrp	x8, _MLX4_ATTR_EXTENDED_PORT_INFO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MLX4_ATTR_EXTENDED_PORT_INFO@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x22
	bl	_cpu_to_be32
	str	x0, [x19, #8]
	mov	x0, x23
	bl	_to_mdev
	mov	x1, x24
	mov	x2, x22
	mov	x3, #0
	mov	x4, #0
	mov	x5, x19
	mov	x6, x21
	bl	_mlx4_MAD_IFC
	mov	x26, x0
	cbnz	w0, LBB0_3
; %bb.15:
	ldr	x8, [x21]
	ldrb	w8, [x8, #60]
	tbz	w8, #0, LBB0_17
; %bb.16:
Lloh27:
	adrp	x8, _IB_SPEED_FDR10@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IB_SPEED_FDR10@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x20, #28]
LBB0_17:
	ldr	w8, [x20, #8]
Lloh30:
	adrp	x9, _IB_PORT_DOWN@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IB_PORT_DOWN@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.18:
	mov	w26, #0
Lloh33:
	adrp	x8, _IB_SPEED_SDR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IB_SPEED_SDR@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x20, #28]
	b	LBB0_3
LBB0_19:
	mov	w26, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_MAD_IFC_IGNORE_KEYS,4,2   ; @MLX4_MAD_IFC_IGNORE_KEYS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IB_SMP_ATTR_PORT_INFO,4,2      ; @IB_SMP_ATTR_PORT_INFO
	.comm	_MLX4_MAD_IFC_NET_VIEW,4,2      ; @MLX4_MAD_IFC_NET_VIEW
	.comm	_IB_PORT_EXTENDED_SPEEDS_SUP,4,2 ; @IB_PORT_EXTENDED_SPEEDS_SUP
	.comm	_IB_SPEED_FDR,4,2               ; @IB_SPEED_FDR
	.comm	_IB_SPEED_EDR,4,2               ; @IB_SPEED_EDR
	.comm	_IB_SPEED_QDR,4,2               ; @IB_SPEED_QDR
	.comm	_MLX4_ATTR_EXTENDED_PORT_INFO,4,2 ; @MLX4_ATTR_EXTENDED_PORT_INFO
	.comm	_IB_SPEED_FDR10,4,2             ; @IB_SPEED_FDR10
	.comm	_IB_PORT_DOWN,4,2               ; @IB_PORT_DOWN
	.comm	_IB_SPEED_SDR,4,2               ; @IB_SPEED_SDR
	.no_dead_strip	_ib_link_query_port
.subsections_via_symbols
