	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_nic_change_pm_state         ## -- Begin function aq_nic_change_pm_state
	.p2align	4, 0x90
_aq_nic_change_pm_state:                ## @aq_nic_change_pm_state
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_rtnl_lock
	movl	(%r14), %eax
	movq	_PM_EVENT_SLEEP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_PM_EVENT_FREEZE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
LBB0_4:
	movq	_AQ_HW_POWER_STATE_D3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	(%rbx), %edi
	callq	_netif_device_detach
	movl	(%rbx), %edi
	callq	_netif_tx_stop_all_queues
	movq	%rbx, %rdi
	callq	_aq_nic_stop
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movq	%rbx, %rdi
	callq	_aq_nic_deinit
LBB0_10:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	callq	_aq_nic_init
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	callq	_aq_nic_start
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	movl	(%rbx), %edi
	callq	_netif_device_attach
	movl	(%rbx), %edi
	callq	_netif_tx_start_all_queues
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_PM_EVENT_SLEEP,4,2             ## @PM_EVENT_SLEEP
	.comm	_PM_EVENT_FREEZE,4,2            ## @PM_EVENT_FREEZE
	.comm	_AQ_HW_POWER_STATE_D3,4,2       ## @AQ_HW_POWER_STATE_D3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_nic_change_pm_state         ; -- Begin function aq_nic_change_pm_state
	.p2align	2
_aq_nic_change_pm_state:                ; @aq_nic_change_pm_state
	.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, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_netif_running
	cbz	w0, LBB0_6
; %bb.1:
	bl	_rtnl_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PM_EVENT_SLEEP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PM_EVENT_SLEEP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _PM_EVENT_FREEZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PM_EVENT_FREEZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_3:
Lloh6:
	adrp	x8, _AQ_HW_POWER_STATE_D3@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AQ_HW_POWER_STATE_D3@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	w0, [x19]
	bl	_netif_device_detach
	ldr	w0, [x19]
	bl	_netif_tx_stop_all_queues
	mov	x0, x19
	bl	_aq_nic_stop
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_aq_nic_deinit
LBB0_5:
	bl	_rtnl_unlock
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	bl	_aq_nic_init
	tbnz	w0, #31, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_aq_nic_start
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.10:
	ldr	w0, [x19]
	bl	_netif_device_attach
	ldr	w0, [x19]
	bl	_netif_tx_start_all_queues
	b	LBB0_5
LBB0_11:
	mov	x20, x0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PM_EVENT_SLEEP,4,2             ; @PM_EVENT_SLEEP
	.comm	_PM_EVENT_FREEZE,4,2            ; @PM_EVENT_FREEZE
	.comm	_AQ_HW_POWER_STATE_D3,4,2       ; @AQ_HW_POWER_STATE_D3
.subsections_via_symbols
