	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_lag_remove                ## -- Begin function mlx5_lag_remove
	.p2align	4, 0x90
_mlx5_lag_remove:                       ## @mlx5_lag_remove
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_mlx5_lag_dev_get
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	___mlx5_lag_is_active
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_mlx5_deactivate_lag
LBB0_3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mlx5_lag_dev_remove_pf
	movq	_MLX5_MAX_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.7:
	movq	16(%rbx), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rcx,8)
	jne	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_8
	jmp	LBB0_10
LBB0_4:
	xorl	%ecx, %ecx
LBB0_5:
	cmpl	%eax, %ecx
	jne	LBB0_6
LBB0_10:
	cmpq	$0, 8(%rbx)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_unregister_netdevice_notifier
LBB0_12:
	movq	%rbx, %rdi
	callq	_mlx5_lag_mp_cleanup
	movq	%rbx, %rdi
	callq	_cancel_delayed_work_sync
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mlx5_lag_dev_free              ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_MAX_PORTS,4,2             ## @MLX5_MAX_PORTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_lag_remove                ; -- Begin function mlx5_lag_remove
	.p2align	2
_mlx5_lag_remove:                       ; @mlx5_lag_remove
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_mlx5_lag_dev_get
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x0
	bl	___mlx5_lag_is_active
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_mlx5_deactivate_lag
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx5_lag_dev_remove_pf
Lloh0:
	adrp	x8, _MLX5_MAX_PORTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_MAX_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x9, #0
	ldr	x10, [x19, #16]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x9, lsl #3]
	cbnz	x11, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_5
	b	LBB0_9
LBB0_7:
	mov	w9, #0
LBB0_8:
	cmp	w9, w8
	b.ne	LBB0_12
LBB0_9:
	mov	x0, x19
	ldr	x8, [x0, #8]!
	cbz	x8, LBB0_11
; %bb.10:
	bl	_unregister_netdevice_notifier
LBB0_11:
	mov	x0, x19
	bl	_mlx5_lag_mp_cleanup
	mov	x0, x19
	bl	_cancel_delayed_work_sync
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mlx5_lag_dev_free
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_MAX_PORTS,4,2             ; @MLX5_MAX_PORTS
.subsections_via_symbols
