	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_query_hca_port
_mlx5_query_hca_port:                   ## @mlx5_query_hca_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_to_mdev
	movq	(%rax), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	movq	%r12, %r8
	callq	_mlx5_query_hca_vport_context
	movl	%r15d, %ebx
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movl	44(%r12), %eax
	movl	%eax, 88(%r14)
	movl	40(%r12), %eax
	movl	%eax, 84(%r14)
	movups	24(%r12), %xmm0
	movups	%xmm0, 68(%r14)
	movl	(%r12), %eax
	movl	%eax, (%r14)
	movq	_gid_table_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_MLX5_CAP_GEN
	movl	%eax, %edi
	callq	_mlx5_get_gid_table_len
	movl	%eax, 64(%r14)
	movq	_log_max_msg@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_MLX5_CAP_GEN
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%edx, 4(%r14)
	movq	_pkey_table_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_MLX5_CAP_GEN
	movl	%eax, %edi
	callq	_mlx5_to_sw_pkey_sz
	movl	%eax, 60(%r14)
	movups	8(%r12), %xmm0
	movups	%xmm0, 44(%r14)
	movq	_IB_PORT_CAP_MASK2_SUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.4:
	movl	4(%r12), %eax
	movl	%eax, 40(%r14)
LBB0_5:
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_mlx5_query_port_link_width_oper
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movl	-48(%rbp), %esi
	leaq	36(%r14), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_translate_active_width
	leaq	32(%r14), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_mlx5_query_port_ib_proto_oper
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	leaq	-56(%rbp), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_mlx5_query_port_max_mtu
	movl	-56(%rbp), %edi
	callq	_mlx5_mtu_to_ib_mtu
	movq	%rax, 24(%r14)
	leaq	-52(%rbp), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_mlx5_query_port_oper_mtu
	movl	-52(%rbp), %edi
	callq	_mlx5_mtu_to_ib_mtu
	movq	%rax, 16(%r14)
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_mlx5_query_port_vl_hw_cap
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	-44(%rbp), %esi
	addq	$8, %r14
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_translate_max_vl_num
	movl	%eax, %r15d
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_9:
	movq	%r12, %rdi
	callq	_kfree
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gid_table_size,4,2             ## @gid_table_size
	.comm	_log_max_msg,4,2                ## @log_max_msg
	.comm	_pkey_table_size,4,2            ## @pkey_table_size
	.comm	_IB_PORT_CAP_MASK2_SUP,4,2      ## @IB_PORT_CAP_MASK2_SUP
	.no_dead_strip	_mlx5_query_hca_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_query_hca_port
_mlx5_query_hca_port:                   ; @mlx5_query_hca_port
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_to_mdev
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.1:
	mov	x0, x23
	mov	w1, #0
	mov	x2, x22
	mov	w3, #0
	mov	x4, x19
	bl	_mlx5_query_hca_vport_context
	mov	x24, x0
	cbnz	w0, LBB0_9
; %bb.2:
	ldr	d0, [x19, #40]
	stur	d0, [x21, #84]
	ldur	q0, [x19, #24]
	stur	q0, [x21, #68]
	ldr	w8, [x19]
	str	w8, [x21]
Lloh3:
	adrp	x8, _gid_table_size@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gid_table_size@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_MLX5_CAP_GEN
	bl	_mlx5_get_gid_table_len
	str	w0, [x21, #64]
Lloh6:
	adrp	x8, _log_max_msg@GOTPAGE
Lloh7:
	ldr	x8, [x8, _log_max_msg@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_MLX5_CAP_GEN
	mov	w8, #1
	lsl	w8, w8, w0
	str	w8, [x21, #4]
Lloh9:
	adrp	x8, _pkey_table_size@GOTPAGE
Lloh10:
	ldr	x8, [x8, _pkey_table_size@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_MLX5_CAP_GEN
	bl	_mlx5_to_sw_pkey_sz
	str	w0, [x21, #60]
	ldur	q0, [x19, #8]
	stur	q0, [x21, #44]
	ldr	w8, [x21]
Lloh12:
	adrp	x9, _IB_PORT_CAP_MASK2_SUP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IB_PORT_CAP_MASK2_SUP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x19, #4]
	str	w8, [x21, #40]
LBB0_4:
	add	x1, sp, #4
	mov	x0, x23
	mov	x2, x22
	bl	_mlx5_query_port_link_width_oper
	mov	x24, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	w1, [sp, #4]
	add	x2, x21, #36
	mov	x0, x20
	bl	_translate_active_width
	add	x1, x21, #32
	mov	x0, x23
	mov	x2, x22
	bl	_mlx5_query_port_ib_proto_oper
	mov	x24, x0
	cbnz	w0, LBB0_9
; %bb.6:
	add	x1, sp, #12
	mov	x0, x23
	mov	x2, x22
	bl	_mlx5_query_port_max_mtu
	ldr	w0, [sp, #12]
	bl	_mlx5_mtu_to_ib_mtu
	str	x0, [x21, #24]
	add	x1, sp, #8
	mov	x0, x23
	mov	x2, x22
	bl	_mlx5_query_port_oper_mtu
	ldr	w0, [sp, #8]
	bl	_mlx5_mtu_to_ib_mtu
	str	x0, [x21, #16]
	mov	x1, sp
	mov	x0, x23
	mov	x2, x22
	bl	_mlx5_query_port_vl_hw_cap
	mov	x24, x0
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	w1, [sp]
	add	x2, x21, #8
	mov	x0, x20
	bl	_translate_max_vl_num
	mov	x24, x0
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_9:
	mov	x0, x19
	bl	_kfree
	mov	x0, x24
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gid_table_size,4,2             ; @gid_table_size
	.comm	_log_max_msg,4,2                ; @log_max_msg
	.comm	_pkey_table_size,4,2            ; @pkey_table_size
	.comm	_IB_PORT_CAP_MASK2_SUP,4,2      ; @IB_PORT_CAP_MASK2_SUP
	.no_dead_strip	_mlx5_query_hca_port
.subsections_via_symbols
