	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_mf_bond
_mlx4_mf_bond:                          ## @mlx4_mf_bond
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_slaves_port_1_2@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_MLX4_MFUNC_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_BITMAP
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mlx4_phys_to_slaves_pport
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_mlx4_phys_to_slaves_pport
	movl	%eax, %r14d
	movl	(%r12), %edi
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_bitmap_and
	movl	(%r12), %edi
	movq	8(%rbx), %rax
	movq	(%rax), %rsi
	incq	%rsi
	callq	_bitmap_weight
	cmpl	$2, %eax
	jl	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mlx4_warn
	jmp	LBB0_3
LBB0_4:
	movq	8(%rbx), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movl	%r15d, %edi
	callq	_bitmap_weight
	movl	%eax, %r15d
	movq	8(%rbx), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movl	%r14d, %edi
	callq	_bitmap_weight
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r15,%rax), %edx
	addl	$-2, %edx
	movq	_MAX_MF_BOND_ALLOWED_SLAVES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %edx
	jle	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mlx4_warn
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%rbx), %rax
	movq	_MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	callq	_mlx4_bond_mac_table
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	%rbx, %rdi
	callq	_mlx4_bond_vlan_table
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	callq	_mlx4_bond_fs_rules
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mlx4_unbond_vlan_table
LBB0_13:
	movq	%rbx, %rdi
	callq	_mlx4_unbond_mac_table
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_slaves_port_1_2,4,2            ## @slaves_port_1_2
	.comm	_MLX4_MFUNC_MAX,4,2             ## @MLX4_MFUNC_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HA mode unsupported for dual ported VFs\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_MF_BOND_ALLOWED_SLAVES,4,2 ## @MAX_MF_BOND_ALLOWED_SLAVES
L_.str.1:                               ## @.str.1
	.asciz	"HA mode is not supported for %d VFs (max %d are allowed)\n"

	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ## @MLX4_STEERING_MODE_DEVICE_MANAGED
L_.str.2:                               ## @.str.2
	.asciz	"HA mode unsupported for NON DMFS steering\n"

	.no_dead_strip	_mlx4_mf_bond
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_mf_bond
_mlx4_mf_bond:                          ; @mlx4_mf_bond
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _slaves_port_1_2@GOTPAGE
Lloh1:
	ldr	x22, [x22, _slaves_port_1_2@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _MLX4_MFUNC_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLX4_MFUNC_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_DECLARE_BITMAP
	mov	x0, x19
	mov	w1, #1
	bl	_mlx4_phys_to_slaves_pport
	mov	x21, x0
	mov	x0, x19
	mov	w1, #2
	bl	_mlx4_phys_to_slaves_pport
	mov	x20, x0
	ldr	w0, [x22]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x3, x8, #1
	mov	x1, x21
	mov	x2, x20
	bl	_bitmap_and
	ldr	w0, [x22]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x1, x8, #1
	bl	_bitmap_weight
	cmp	w0, #2
	b.lt	LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x1, x8, #1
	mov	x0, x21
	bl	_bitmap_weight
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x1, x8, #1
	mov	x0, x20
	bl	_bitmap_weight
	add	w8, w21, w0
	sub	w8, w8, #2
Lloh7:
	adrp	x9, _MAX_MF_BOND_ALLOWED_SLAVES@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_MF_BOND_ALLOWED_SLAVES@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_4
; %bb.3:
	stp	x8, x9, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_4:
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x19
	bl	_mlx4_bond_mac_table
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.6:
	mov	x0, x19
	bl	_mlx4_bond_vlan_table
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_mlx4_bond_fs_rules
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.8:
	mov	x0, x19
	bl	_mlx4_unbond_vlan_table
LBB0_9:
	mov	x0, x19
	bl	_mlx4_unbond_mac_table
	b	LBB0_12
LBB0_10:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_mlx4_warn
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_slaves_port_1_2,4,2            ; @slaves_port_1_2
	.comm	_MLX4_MFUNC_MAX,4,2             ; @MLX4_MFUNC_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HA mode unsupported for dual ported VFs\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_MF_BOND_ALLOWED_SLAVES,4,2 ; @MAX_MF_BOND_ALLOWED_SLAVES
l_.str.1:                               ; @.str.1
	.asciz	"HA mode is not supported for %d VFs (max %d are allowed)\n"

	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ; @MLX4_STEERING_MODE_DEVICE_MANAGED
l_.str.2:                               ; @.str.2
	.asciz	"HA mode unsupported for NON DMFS steering\n"

	.no_dead_strip	_mlx4_mf_bond
.subsections_via_symbols
