	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ena_destroy_device
_ena_destroy_device:                    ## @ena_destroy_device
	.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
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	32(%rdi), %r12
	movq	_ENA_FLAG_DEVICE_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %r14
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	%r12, %rdi
	callq	_netif_carrier_off
	leaq	24(%rbx), %rdi
	callq	_del_timer_sync
	movq	_ENA_FLAG_DEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	movl	%eax, %r12d
	movl	%eax, (%rbx)
	testl	%r13d, %r13d
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ena_com_set_admin_running_state
LBB0_3:
	movq	_ENA_FLAG_DEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_ena_down
LBB0_5:
	movq	_ENA_FLAG_TRIGGER_RESET@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	testl	%r12d, %r12d
	jne	LBB0_8
LBB0_7:
	movq	16(%rbx), %rdi
	movl	8(%rbx), %esi
	callq	_ena_com_dev_reset
LBB0_8:
	movq	%rbx, %rdi
	callq	_ena_free_mgmnt_irq
	movq	%rbx, %rdi
	callq	_ena_disable_msix
	movq	%r15, %rdi
	callq	_ena_com_abort_admin_commands
	movq	%r15, %rdi
	callq	_ena_com_wait_for_abort_completion
	movq	%r15, %rdi
	callq	_ena_com_admin_destroy
	movq	%r15, %rdi
	callq	_ena_com_mmio_reg_read_request_destroy
	movq	_ENA_REGS_RESET_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	_ENA_FLAG_DEVICE_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit                      ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENA_FLAG_DEVICE_RUNNING,4,2    ## @ENA_FLAG_DEVICE_RUNNING
	.comm	_ENA_FLAG_DEV_UP,4,2            ## @ENA_FLAG_DEV_UP
	.comm	_ENA_FLAG_TRIGGER_RESET,4,2     ## @ENA_FLAG_TRIGGER_RESET
	.comm	_ENA_REGS_RESET_NORMAL,4,2      ## @ENA_REGS_RESET_NORMAL
	.no_dead_strip	_ena_destroy_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ena_destroy_device
_ena_destroy_device:                    ; @ena_destroy_device
	.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
	mov	x22, x1
	mov	x20, x0
	ldr	x23, [x0, #32]
	ldr	x21, [x0, #16]
Lloh0:
	adrp	x24, _ENA_FLAG_DEVICE_RUNNING@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ENA_FLAG_DEVICE_RUNNING@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x19, x20, #4
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_8
; %bb.1:
	mov	x0, x23
	bl	_netif_carrier_off
	add	x0, x20, #24
	bl	_del_timer_sync
Lloh2:
	adrp	x25, _ENA_FLAG_DEV_UP@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ENA_FLAG_DEV_UP@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x19
	bl	_test_bit
	mov	x23, x0
	str	w0, [x20]
	cbnz	w22, LBB0_3
; %bb.2:
	mov	x0, x21
	mov	w1, #0
	bl	_ena_com_set_admin_running_state
LBB0_3:
	ldr	w0, [x25]
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_ena_down
LBB0_5:
Lloh4:
	adrp	x22, _ENA_FLAG_TRIGGER_RESET@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ENA_FLAG_TRIGGER_RESET@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	cmp	w0, #0
	ccmp	w23, #0, #4, ne
	b.ne	LBB0_7
; %bb.6:
	ldr	x0, [x20, #16]
	ldr	w1, [x20, #8]
	bl	_ena_com_dev_reset
LBB0_7:
	mov	x0, x20
	bl	_ena_free_mgmnt_irq
	mov	x0, x20
	bl	_ena_disable_msix
	mov	x0, x21
	bl	_ena_com_abort_admin_commands
	mov	x0, x21
	bl	_ena_com_wait_for_abort_completion
	mov	x0, x21
	bl	_ena_com_admin_destroy
	mov	x0, x21
	bl	_ena_com_mmio_reg_read_request_destroy
Lloh6:
	adrp	x8, _ENA_REGS_RESET_NORMAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENA_REGS_RESET_NORMAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_clear_bit
	ldr	w0, [x24]
	mov	x1, 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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_clear_bit
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENA_FLAG_DEVICE_RUNNING,4,2    ; @ENA_FLAG_DEVICE_RUNNING
	.comm	_ENA_FLAG_DEV_UP,4,2            ; @ENA_FLAG_DEV_UP
	.comm	_ENA_FLAG_TRIGGER_RESET,4,2     ; @ENA_FLAG_TRIGGER_RESET
	.comm	_ENA_REGS_RESET_NORMAL,4,2      ; @ENA_REGS_RESET_NORMAL
	.no_dead_strip	_ena_destroy_device
.subsections_via_symbols
