	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_do_bond
_mlx5_do_bond:                          ## @mlx5_do_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	testq	%r15, %r15
	je	LBB0_17
## %bb.1:
	movq	8(%rax), %r14
	testq	%r14, %r14
	je	LBB0_17
## %bb.2:
	movq	%rdi, %r13
	movq	_lag_mutex@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r13), %rbx
	movq	%rbx, -48(%rbp)
	movq	%r12, %rdi
	callq	_mutex_unlock
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.3:
	movq	%r13, %rdi
	callq	_mlx5_lag_check_prereq
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	movq	%r13, %rdi
	callq	___mlx5_lag_is_active
	testq	%rax, %rax
	je	LBB0_5
## %bb.10:
	movq	%r13, %rdi
	callq	___mlx5_lag_is_active
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_mlx5_modify_lag
	jmp	LBB0_17
LBB0_12:
	movq	%r13, %rdi
	callq	___mlx5_lag_is_active
	testq	%rax, %rax
	je	LBB0_17
## %bb.13:
	movq	%r13, %rdi
	callq	___mlx5_lag_is_roce
	testl	%eax, %eax
	je	LBB0_18
## %bb.14:
	movq	_MLX5_INTERFACE_PROTOCOL_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mlx5_remove_dev_by_protocol
	movq	%r14, %rdi
	callq	_mlx5_nic_vport_disable_roce
	movq	%r13, %rdi
	callq	_mlx5_deactivate_lag
	testl	%eax, %eax
	jne	LBB0_17
## %bb.15:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_lag_add_ib_devices        ## TAILCALL
LBB0_5:
	movq	%r15, %rdi
	callq	_mlx5_sriov_is_enabled
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_mlx5_sriov_is_enabled
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	movq	_MLX5_LAG_FLAG_SRIOV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_mlx5_activate_lag
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_deactivate_lag            ## TAILCALL
LBB0_8:
	movq	%r13, %rdi
	callq	_mlx5_lag_remove_ib_devices
	movq	_MLX5_LAG_FLAG_ROCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_mlx5_activate_lag
	testl	%eax, %eax
	je	LBB0_16
## %bb.9:
	movq	%r13, %rdi
	callq	_mlx5_lag_add_ib_devices
	jmp	LBB0_17
LBB0_16:
	movq	_MLX5_INTERFACE_PROTOCOL_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mlx5_add_dev_by_protocol
	movq	%r14, %rdi
	callq	_mlx5_nic_vport_enable_roce
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_lag_mutex,4,2                  ## @lag_mutex
	.comm	_MLX5_LAG_FLAG_ROCE,4,2         ## @MLX5_LAG_FLAG_ROCE
	.comm	_MLX5_LAG_FLAG_SRIOV,4,2        ## @MLX5_LAG_FLAG_SRIOV
	.comm	_MLX5_INTERFACE_PROTOCOL_IB,4,2 ## @MLX5_INTERFACE_PROTOCOL_IB
	.comm	_MLX5_ESWITCH_NONE,8,3          ## @MLX5_ESWITCH_NONE
	.no_dead_strip	_mlx5_do_bond
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_do_bond
_mlx5_do_bond:                          ; @mlx5_do_bond
	.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
	ldr	x8, [x0, #8]
	ldp	x21, x20, [x8]
	cmp	x21, #0
	ccmp	x20, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
	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
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x22, _lag_mutex@GOTPAGE
Lloh1:
	ldr	x22, [x22, _lag_mutex@GOTPAGEOFF]
	mov	x0, x22
	bl	_mutex_lock
	ldr	x23, [x19]
	str	x23, [sp, #8]
	mov	x0, x22
	bl	_mutex_unlock
	cbz	x23, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_mlx5_lag_check_prereq
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	___mlx5_lag_is_active
	cbz	x0, LBB0_11
; %bb.5:
	mov	x0, x19
	bl	___mlx5_lag_is_active
	cbz	x0, LBB0_1
; %bb.6:
	add	x1, sp, #8
	mov	x0, x19
	bl	_mlx5_modify_lag
	b	LBB0_1
LBB0_7:
	mov	x0, x19
	bl	___mlx5_lag_is_active
	cbz	x0, LBB0_1
; %bb.8:
	mov	x0, x19
	bl	___mlx5_lag_is_roce
	cbz	w0, LBB0_14
; %bb.9:
Lloh2:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mlx5_remove_dev_by_protocol
	mov	x0, x20
	bl	_mlx5_nic_vport_disable_roce
	mov	x0, x19
	bl	_mlx5_deactivate_lag
	cbnz	w0, LBB0_1
; %bb.10:
	mov	x0, x19
	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
	b	_mlx5_lag_add_ib_devices
LBB0_11:
	mov	x0, x21
	bl	_mlx5_sriov_is_enabled
	cbnz	w0, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_mlx5_sriov_is_enabled
	cbz	w0, LBB0_15
LBB0_13:
Lloh5:
	adrp	x8, _MLX5_LAG_FLAG_SRIOV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLX5_LAG_FLAG_SRIOV@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_mlx5_activate_lag
	b	LBB0_1
LBB0_14:
	mov	x0, x19
	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
	b	_mlx5_deactivate_lag
LBB0_15:
	mov	x0, x19
	bl	_mlx5_lag_remove_ib_devices
Lloh8:
	adrp	x8, _MLX5_LAG_FLAG_ROCE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLX5_LAG_FLAG_ROCE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_mlx5_activate_lag
	cbz	w0, LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_mlx5_lag_add_ib_devices
	b	LBB0_1
LBB0_17:
Lloh11:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mlx5_add_dev_by_protocol
	mov	x0, x20
	bl	_mlx5_nic_vport_enable_roce
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_lag_mutex,4,2                  ; @lag_mutex
	.comm	_MLX5_LAG_FLAG_ROCE,4,2         ; @MLX5_LAG_FLAG_ROCE
	.comm	_MLX5_LAG_FLAG_SRIOV,4,2        ; @MLX5_LAG_FLAG_SRIOV
	.comm	_MLX5_INTERFACE_PROTOCOL_IB,4,2 ; @MLX5_INTERFACE_PROTOCOL_IB
	.comm	_MLX5_ESWITCH_NONE,8,3          ; @MLX5_ESWITCH_NONE
	.no_dead_strip	_mlx5_do_bond
.subsections_via_symbols
