	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_port_immutable
_mlx5_port_immutable:                   ## @mlx5_port_immutable
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_to_mdev
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_mlx5_ib_port_link_layer
	movl	%eax, %r12d
	movl	$0, -48(%rbp)
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_ib_query_port
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	_IB_LINK_LAYER_INFINIBAND@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_3
## %bb.2:
	movl	(%r14), %edi
	leaq	-48(%rbp), %r8
	xorl	%esi, %esi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_mlx5_query_hca_vport_context
	testl	%eax, %eax
	jne	LBB0_7
LBB0_3:
	movl	-52(%rbp), %eax
	movl	%eax, 12(%r15)
	movl	-56(%rbp), %eax
	movl	%eax, 8(%r15)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_get_core_cap_flags
	movl	%eax, 4(%r15)
	movq	_IB_LINK_LAYER_INFINIBAND@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	movq	_roce@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_GEN
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	_IB_MGMT_MAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_LINK_LAYER_INFINIBAND,4,2   ## @IB_LINK_LAYER_INFINIBAND
	.comm	_roce,4,2                       ## @roce
	.comm	_IB_MGMT_MAD_SIZE,4,2           ## @IB_MGMT_MAD_SIZE
	.no_dead_strip	_mlx5_port_immutable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_port_immutable
_mlx5_port_immutable:                   ; @mlx5_port_immutable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x23, x1
	mov	x21, x0
	bl	_to_mdev
	mov	x20, x0
	mov	x0, x21
	mov	x1, x23
	bl	_mlx5_ib_port_link_layer
	mov	x22, x0
	str	wzr, [sp]
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x23
	bl	_ib_query_port
	cbnz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x24, _IB_LINK_LAYER_INFINIBAND@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IB_LINK_LAYER_INFINIBAND@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w22, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x20]
	mov	x4, sp
	mov	w1, #0
	mov	x2, x23
	mov	w3, #0
	bl	_mlx5_query_hca_vport_context
	cbnz	w0, LBB0_6
LBB0_3:
	ldr	d0, [sp, #8]
	str	d0, [x19, #8]
	mov	x1, sp
	mov	x0, x21
	bl	_get_core_cap_flags
	str	w0, [x19, #4]
	ldr	w8, [x24]
	cmp	w22, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _roce@GOTPAGE
Lloh3:
	ldr	x8, [x8, _roce@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_MLX5_CAP_GEN
	cbz	x0, LBB0_6
LBB0_5:
	mov	w0, #0
Lloh5:
	adrp	x8, _IB_MGMT_MAD_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_MGMT_MAD_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_LINK_LAYER_INFINIBAND,4,2   ; @IB_LINK_LAYER_INFINIBAND
	.comm	_roce,4,2                       ; @roce
	.comm	_IB_MGMT_MAD_SIZE,4,2           ; @IB_MGMT_MAD_SIZE
	.no_dead_strip	_mlx5_port_immutable
.subsections_via_symbols
