	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function typhoon_close
_typhoon_close:                         ## @typhoon_close
	.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	_netdev_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%rbx, %rdi
	callq	_napi_disable
	movq	_WaitSleep@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_typhoon_stop_runtime
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_2:
	movl	(%r14), %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	%rbx, %rdi
	callq	_typhoon_free_rx_rings
	movq	%rbx, %rdi
	callq	_typhoon_init_rings
	movq	_TYPHOON_STATUS_WAITING_FOR_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_typhoon_boot_3XP
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_4:
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_typhoon_sleep
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WaitSleep,4,2                  ## @WaitSleep
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to stop runtime\n"

	.comm	_TYPHOON_STATUS_WAITING_FOR_HOST,4,2 ## @TYPHOON_STATUS_WAITING_FOR_HOST
L_.str.1:                               ## @.str.1
	.asciz	"unable to boot sleep image\n"

	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
L_.str.2:                               ## @.str.2
	.asciz	"unable to put card to sleep\n"

	.no_dead_strip	_typhoon_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function typhoon_close
_typhoon_close:                         ; @typhoon_close
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x20
	bl	_napi_disable
Lloh0:
	adrp	x8, _WaitSleep@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WaitSleep@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_typhoon_stop_runtime
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_2:
	ldr	w0, [x19]
	mov	x1, x19
	bl	_free_irq
	mov	x0, x20
	bl	_typhoon_free_rx_rings
	mov	x0, x20
	bl	_typhoon_init_rings
Lloh5:
	adrp	x8, _TYPHOON_STATUS_WAITING_FOR_HOST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TYPHOON_STATUS_WAITING_FOR_HOST@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_typhoon_boot_3XP
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_4:
Lloh10:
	adrp	x8, _PCI_D3hot@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCI_D3hot@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_typhoon_sleep
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_WaitSleep,4,2                  ; @WaitSleep
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to stop runtime\n"

	.comm	_TYPHOON_STATUS_WAITING_FOR_HOST,4,2 ; @TYPHOON_STATUS_WAITING_FOR_HOST
l_.str.1:                               ; @.str.1
	.asciz	"unable to boot sleep image\n"

	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
l_.str.2:                               ; @.str.2
	.asciz	"unable to put card to sleep\n"

	.no_dead_strip	_typhoon_close
.subsections_via_symbols
