	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_query_hca_vport_pkey      ## -- Begin function mlx5_query_hca_vport_pkey
	.p2align	4, 0x90
_mlx5_query_hca_vport_pkey:             ## @mlx5_query_hca_vport_pkey
	.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
	movq	%r9, %r12
	movl	%r8d, %r15d
	movl	%ecx, -76(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	_query_hca_vport_pkey_in@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_MLX5_ST_SZ_BYTES
	movl	%eax, %r13d
	movq	_query_hca_vport_pkey_out@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_MLX5_ST_SZ_BYTES
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_vport_group_manager@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_MLX5_CAP_GEN
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	_pkey_table_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_MLX5_CAP_GEN
	movl	%eax, %edi
	callq	_mlx5_to_sw_pkey_sz
	cmpl	$65535, %r15d                   ## imm = 0xFFFF
	je	LBB0_3
## %bb.1:
	cmpl	%r15d, %eax
	jge	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_18
LBB0_3:
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	cmpl	$65535, %r15d                   ## imm = 0xFFFF
	movl	$1, %r14d
	cmovel	%eax, %r14d
	movq	%r12, %rdi
	callq	_MLX5_ST_SZ_BYTES
	movl	%r13d, %edi
	movl	%eax, %r13d
	imull	%r14d, %r13d
	addl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%edi, -72(%rbp)                 ## 4-byte Spill
	callq	_kzalloc
	movl	(%rbx), %esi
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_kzalloc
	movq	%rbx, %rsi
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_query_hca_vport_pkey_in@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_opcode@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_MLX5_SET
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.7:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	cmpl	$0, -80(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_19
## %bb.8:
	movq	(%rbx), %rdi
	movq	_vport_number@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	callq	_MLX5_SET
	movq	(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	$1, %ecx
	callq	_MLX5_SET
LBB0_9:
	movq	(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%r15d, %ecx
	callq	_MLX5_SET
	movq	_num_ports@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_MLX5_CAP_GEN
	cmpl	$2, %eax
	jne	LBB0_11
## %bb.10:
	movq	(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %edx
	callq	_MLX5_SET
LBB0_11:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movl	%r13d, %r8d
	callq	_mlx5_cmd_exec
	movl	%eax, %r15d
	testl	%eax, %eax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_17
## %bb.12:
	movq	%rsi, %r13
	movq	_query_hca_vport_pkey_out@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_MLX5_ADDR_OF
	xorl	%r15d, %r15d
	testl	%r14d, %r14d
	jle	LBB0_15
## %bb.13:
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_MLX5_GET_PR
	movl	%eax, (%r12)
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_MLX5_ST_SZ_BYTES
	cltq
	addq	%rax, %rbx
	decl	%r14d
	jne	LBB0_14
LBB0_15:
	movq	%r13, %rsi
	jmp	LBB0_16
LBB0_5:
	movq	%rax, %rbx
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_17
LBB0_19:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_16:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_17:
	movq	%rsi, %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_kfree
LBB0_18:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_query_hca_vport_pkey_in,8,3    ## @query_hca_vport_pkey_in
	.comm	_query_hca_vport_pkey_out,8,3   ## @query_hca_vport_pkey_out
	.comm	_vport_group_manager,4,2        ## @vport_group_manager
	.comm	_pkey_table_size,4,2            ## @pkey_table_size
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_opcode,4,2                     ## @opcode
	.comm	_MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY,4,2 ## @MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY
	.comm	_vport_number,4,2               ## @vport_number
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_num_ports,4,2                  ## @num_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_query_hca_vport_pkey      ; -- Begin function mlx5_query_hca_vport_pkey
	.p2align	2
_mlx5_query_hca_vport_pkey:             ; @mlx5_query_hca_vport_pkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x25, x4
	mov	x27, x3
	mov	x21, x2
	mov	x26, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _query_hca_vport_pkey_in@GOTPAGE
Lloh1:
	ldr	x8, [x8, _query_hca_vport_pkey_in@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	bl	_MLX5_ST_SZ_BYTES
	mov	x24, x0
Lloh3:
	adrp	x8, _query_hca_vport_pkey_out@GOTPAGE
Lloh4:
	ldr	x8, [x8, _query_hca_vport_pkey_out@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
	bl	_MLX5_ST_SZ_BYTES
	mov	x20, x0
Lloh6:
	adrp	x8, _vport_group_manager@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vport_group_manager@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_MLX5_CAP_GEN
	mov	x23, x0
Lloh9:
	adrp	x8, _pkey_table_size@GOTPAGE
Lloh10:
	ldr	x8, [x8, _pkey_table_size@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_MLX5_CAP_GEN
	bl	_mlx5_to_sw_pkey_sz
	mov	w8, #65535
	cmp	w25, w8
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, w25
	b.ge	LBB0_3
; %bb.2:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_17
LBB0_3:
	stp	w21, w27, [sp, #8]              ; 8-byte Folded Spill
	cmp	w25, w8
	csinc	w27, w0, wzr, eq
	mov	x0, x19
	bl	_MLX5_ST_SZ_BYTES
	madd	w28, w0, w27, w20
Lloh15:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x24
	bl	_kzalloc
	mov	x20, x0
	ldr	w1, [x21]
	mov	x0, x28
	bl	_kzalloc
	mov	x21, x0
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_5
; %bb.4:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_5:
	str	x21, [sp]                       ; 8-byte Folded Spill
Lloh20:
	adrp	x21, _query_hca_vport_pkey_in@GOTPAGE
Lloh21:
	ldr	x21, [x21, _query_hca_vport_pkey_in@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh22:
	adrp	x8, _opcode@GOTPAGE
Lloh23:
	ldr	x8, [x8, _opcode@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x8, _MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	mov	x1, x20
	bl	_MLX5_SET
	cbz	w26, LBB0_8
; %bb.6:
	cbz	w23, LBB0_15
; %bb.7:
Lloh28:
	adrp	x21, _query_hca_vport_pkey_in@GOTPAGE
Lloh29:
	ldr	x21, [x21, _query_hca_vport_pkey_in@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh30:
	adrp	x8, _vport_number@GOTPAGE
Lloh31:
	ldr	x8, [x8, _vport_number@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x1, x20
	ldr	w3, [sp, #12]                   ; 4-byte Folded Reload
	bl	_MLX5_SET
	ldr	x0, [x21]
	mov	x1, x20
	mov	x2, x26
	mov	w3, #1
	bl	_MLX5_SET
LBB0_8:
	ldr	x0, [x21]
	mov	x1, x20
	mov	x2, x25
	mov	x3, x25
	bl	_MLX5_SET
Lloh33:
	adrp	x8, _num_ports@GOTPAGE
Lloh34:
	ldr	x8, [x8, _num_ports@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_MLX5_CAP_GEN
	cmp	w0, #2
	b.ne	LBB0_10
; %bb.9:
	ldr	x0, [x21]
	mov	x1, x20
	ldr	w2, [sp, #8]                    ; 4-byte Folded Reload
	mov	x3, x2
	bl	_MLX5_SET
LBB0_10:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x24
	ldr	x21, [sp]                       ; 8-byte Folded Reload
	mov	x3, x21
	mov	x4, x28
	bl	_mlx5_cmd_exec
	mov	x22, x0
	cbnz	w0, LBB0_16
; %bb.11:
Lloh36:
	adrp	x8, _query_hca_vport_pkey_out@GOTPAGE
Lloh37:
	ldr	x8, [x8, _query_hca_vport_pkey_out@GOTPAGEOFF]
Lloh38:
	ldr	x0, [x8]
	mov	x1, x21
	mov	x2, x19
	bl	_MLX5_ADDR_OF
	cmp	w27, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x22, x0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x19
	bl	_MLX5_GET_PR
	str	w0, [x19], #4
	mov	x0, x19
	bl	_MLX5_ST_SZ_BYTES
	add	x22, x22, w0, sxtw
	subs	w27, w27, #1
	b.ne	LBB0_13
LBB0_14:
	mov	w22, #0
	b	LBB0_16
LBB0_15:
Lloh39:
	adrp	x8, _EPERM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	x21, [sp]                       ; 8-byte Folded Reload
LBB0_16:
	mov	x0, x20
	bl	_kfree
	mov	x0, x21
	bl	_kfree
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_query_hca_vport_pkey_in,8,3    ; @query_hca_vport_pkey_in
	.comm	_query_hca_vport_pkey_out,8,3   ; @query_hca_vport_pkey_out
	.comm	_vport_group_manager,4,2        ; @vport_group_manager
	.comm	_pkey_table_size,4,2            ; @pkey_table_size
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_opcode,4,2                     ; @opcode
	.comm	_MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY,4,2 ; @MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY
	.comm	_vport_number,4,2               ; @vport_number
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_num_ports,4,2                  ; @num_ports
.subsections_via_symbols
