	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_destroy_netdev         ## -- Begin function mlx4_en_destroy_netdev
	.p2align	4, 0x90
_mlx4_en_destroy_netdev:                ## @mlx4_en_destroy_netdev
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	(%rax), %rcx
	movq	40(%rax), %r15
	movq	_DRV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rsi
	callq	_en_dbg
	cmpq	$0, 32(%rbx)
	je	LBB0_2
## %bb.1:
	movq	24(%r15), %rdi
	movq	(%rbx), %rsi
	callq	_mlx4_get_devlink_port
	movl	%eax, %edi
	callq	_devlink_port_type_clear
	movq	%r14, %rdi
	callq	_unregister_netdev
LBB0_2:
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.3:
	movq	24(%r15), %rdi
	leaq	16(%rbx), %rsi
	movq	_MLX4_EN_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mlx4_free_hwq_res
LBB0_4:
	leaq	12(%rbx), %rdi
	callq	_cancel_delayed_work
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_cancel_delayed_work
	movl	32(%r15), %edi
	callq	_flush_workqueue
	movq	24(%r15), %rax
	movq	_MLX4_DEV_CAP_FLAG2_TS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_mlx4_en_remove_timestamp
LBB0_6:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	16(%r15), %rax
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	8(%r15), %rax
	movq	$0, (%rax,%rcx,8)
	movq	%rbx, %rdi
	callq	_mlx4_en_free_resources
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free_netdev                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRV,4,2                        ## @DRV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Destroying netdev on port:%d\n"

	.comm	_MLX4_EN_PAGE_SIZE,4,2          ## @MLX4_EN_PAGE_SIZE
	.comm	_MLX4_DEV_CAP_FLAG2_TS,4,2      ## @MLX4_DEV_CAP_FLAG2_TS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_destroy_netdev         ; -- Begin function mlx4_en_destroy_netdev
	.p2align	2
_mlx4_en_destroy_netdev:                ; @mlx4_en_destroy_netdev
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_netdev_priv
	mov	x21, x0
	ldr	x20, [x0, #40]
Lloh0:
	adrp	x8, _DRV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRV@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x3, [x21]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x21
	bl	_en_dbg
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x0, [x20, #24]
	ldr	x1, [x21]
	bl	_mlx4_get_devlink_port
	bl	_devlink_port_type_clear
	mov	x0, x19
	bl	_unregister_netdev
LBB0_2:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x0, [x20, #24]
	add	x1, x21, #16
Lloh5:
	adrp	x8, _MLX4_EN_PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLX4_EN_PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_mlx4_free_hwq_res
LBB0_4:
	add	x0, x21, #12
	bl	_cancel_delayed_work
	add	x0, x21, #8
	bl	_cancel_delayed_work
	ldr	w0, [x20, #32]
	bl	_flush_workqueue
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_TS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_TS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_mlx4_en_remove_timestamp
LBB0_6:
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x20, #16]
	ldr	x9, [x21]
	lsl	x9, x9, #3
	str	xzr, [x8, x9]
	ldr	x8, [x20, #8]
	str	xzr, [x8, x9]
	mov	x0, x21
	bl	_mlx4_en_free_resources
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_free_netdev
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DRV,4,2                        ; @DRV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Destroying netdev on port:%d\n"

	.comm	_MLX4_EN_PAGE_SIZE,4,2          ; @MLX4_EN_PAGE_SIZE
	.comm	_MLX4_DEV_CAP_FLAG2_TS,4,2      ; @MLX4_DEV_CAP_FLAG2_TS
.subsections_via_symbols
