	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_SET_PORT_qpn_calc         ## -- Begin function mlx4_SET_PORT_qpn_calc
	.p2align	4, 0x90
_mlx4_SET_PORT_qpn_calc:                ## @mlx4_SET_PORT_qpn_calc
	.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
	movl	%ecx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_MCAST_DEFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MCAST_DIRECT@GOTPCREL(%rip), %rax
LBB0_3:
	movq	8(%rbx), %rcx
	movq	_MLX4_STEERING_MODE_A0@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_6
## %bb.4:
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %r15
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movq	%rax, 56(%r15)
	movl	16(%rbx), %eax
	movl	%eax, 48(%r15)
	movq	_SET_PORT_PROMISC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	orl	%r12d, %r13d
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movq	%rax, 40(%r15)
	movq	_SET_PORT_MC_PROMISC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	orl	%r12d, %r14d
	movl	%r14d, %edi
	callq	_cpu_to_be32
	movq	%rax, 32(%r15)
	movq	$0, 24(%r15)
	movq	_MLX4_NO_VLAN_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	$0, 8(%r15)
	movq	_MLX4_VLAN_MISS_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_MLX4_SET_PORT_RQP_CALC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$8, %edx
	orl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %esi
	movq	_MLX4_SET_PORT_ETH_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MLX4_CMD_SET_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_TIME_CLASS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_WRAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	callq	_mlx4_cmd
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mlx4_free_cmd_mailbox
	movl	%r14d, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DEV_CAP_FLAG_VEP_MC_STEER,4,2 ## @MLX4_DEV_CAP_FLAG_VEP_MC_STEER
	.comm	_MCAST_DIRECT,4,2               ## @MCAST_DIRECT
	.comm	_MCAST_DEFAULT,4,2              ## @MCAST_DEFAULT
	.comm	_MLX4_STEERING_MODE_A0,8,3      ## @MLX4_STEERING_MODE_A0
	.comm	_SET_PORT_PROMISC_SHIFT,4,2     ## @SET_PORT_PROMISC_SHIFT
	.comm	_SET_PORT_MC_PROMISC_SHIFT,4,2  ## @SET_PORT_MC_PROMISC_SHIFT
	.comm	_MLX4_NO_VLAN_IDX,4,2           ## @MLX4_NO_VLAN_IDX
	.comm	_MLX4_VLAN_MISS_IDX,4,2         ## @MLX4_VLAN_MISS_IDX
	.comm	_MLX4_SET_PORT_RQP_CALC,4,2     ## @MLX4_SET_PORT_RQP_CALC
	.comm	_MLX4_SET_PORT_ETH_OPCODE,4,2   ## @MLX4_SET_PORT_ETH_OPCODE
	.comm	_MLX4_CMD_SET_PORT,4,2          ## @MLX4_CMD_SET_PORT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ## @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_WRAPPED,4,2           ## @MLX4_CMD_WRAPPED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_SET_PORT_qpn_calc         ; -- Begin function mlx4_SET_PORT_qpn_calc
	.p2align	2
_mlx4_SET_PORT_qpn_calc:                ; @mlx4_SET_PORT_qpn_calc
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _MCAST_DIRECT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MCAST_DIRECT@GOTPAGEOFF]
Lloh5:
	adrp	x11, _MCAST_DEFAULT@GOTPAGE
Lloh6:
	ldr	x11, [x11, _MCAST_DEFAULT@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	x9, [x0, #8]
Lloh7:
	adrp	x10, _MLX4_STEERING_MODE_A0@GOTPAGE
Lloh8:
	ldr	x10, [x10, _MLX4_STEERING_MODE_A0@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w24, [x8]
	bl	_mlx4_alloc_cmd_mailbox
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	x25, [x20, #8]
	mov	x0, x22
	bl	_cpu_to_be32
	str	x0, [x25, #56]
	ldr	w8, [x19, #16]
	str	w8, [x25, #48]
Lloh10:
	adrp	x8, _SET_PORT_PROMISC_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SET_PORT_PROMISC_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	lsl	w8, w23, w8
	orr	w0, w8, w22
	bl	_cpu_to_be32
	str	x0, [x25, #40]
Lloh13:
	adrp	x8, _SET_PORT_MC_PROMISC_SHIFT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SET_PORT_MC_PROMISC_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	lsl	w8, w24, w8
	orr	w0, w8, w22
	bl	_cpu_to_be32
	stp	xzr, x0, [x25, #24]
Lloh16:
	adrp	x8, _MLX4_NO_VLAN_IDX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MLX4_NO_VLAN_IDX@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x25, #16]
	str	xzr, [x25, #8]
Lloh19:
	adrp	x8, _MLX4_VLAN_MISS_IDX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MLX4_VLAN_MISS_IDX@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x25]
Lloh22:
	adrp	x8, _MLX4_SET_PORT_RQP_CALC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MLX4_SET_PORT_RQP_CALC@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w2, w21, w8, lsl #8
	ldr	w1, [x20]
Lloh25:
	adrp	x8, _MLX4_SET_PORT_ETH_OPCODE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MLX4_SET_PORT_ETH_OPCODE@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
Lloh28:
	adrp	x8, _MLX4_CMD_SET_PORT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MLX4_CMD_SET_PORT@GOTPAGEOFF]
Lloh30:
	ldr	w4, [x8]
Lloh31:
	adrp	x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGEOFF]
Lloh33:
	ldr	w5, [x8]
Lloh34:
	adrp	x8, _MLX4_CMD_WRAPPED@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MLX4_CMD_WRAPPED@GOTPAGEOFF]
Lloh36:
	ldr	w6, [x8]
	mov	x0, x19
	bl	_mlx4_cmd
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_free_cmd_mailbox
	mov	x0, x21
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DEV_CAP_FLAG_VEP_MC_STEER,4,2 ; @MLX4_DEV_CAP_FLAG_VEP_MC_STEER
	.comm	_MCAST_DIRECT,4,2               ; @MCAST_DIRECT
	.comm	_MCAST_DEFAULT,4,2              ; @MCAST_DEFAULT
	.comm	_MLX4_STEERING_MODE_A0,8,3      ; @MLX4_STEERING_MODE_A0
	.comm	_SET_PORT_PROMISC_SHIFT,4,2     ; @SET_PORT_PROMISC_SHIFT
	.comm	_SET_PORT_MC_PROMISC_SHIFT,4,2  ; @SET_PORT_MC_PROMISC_SHIFT
	.comm	_MLX4_NO_VLAN_IDX,4,2           ; @MLX4_NO_VLAN_IDX
	.comm	_MLX4_VLAN_MISS_IDX,4,2         ; @MLX4_VLAN_MISS_IDX
	.comm	_MLX4_SET_PORT_RQP_CALC,4,2     ; @MLX4_SET_PORT_RQP_CALC
	.comm	_MLX4_SET_PORT_ETH_OPCODE,4,2   ; @MLX4_SET_PORT_ETH_OPCODE
	.comm	_MLX4_CMD_SET_PORT,4,2          ; @MLX4_CMD_SET_PORT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ; @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_WRAPPED,4,2           ; @MLX4_CMD_WRAPPED
.subsections_via_symbols
