	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aq_fw1x_set_power
_aq_fw1x_set_power:                     ## @aq_fw1x_set_power
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	$0, -24(%rbp)
	movq	(%rdi), %rax
	movq	_AQ_NIC_WOL_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_aq_fw1x_set_wol
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hw_atl_utils_fw_rpc_wait
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movq	-24(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_HAL_ATLANTIC_UTILS_FW_MSG_ENABLE_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-24(%rbp), %rcx
	movl	%eax, 4(%rcx)
	movl	$2, (%rcx)
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_hw_atl_utils_fw_rpc_call
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
	jmp	LBB0_8
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_hw_atl_utils_mpi_set_speed
	movq	_MPI_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hw_atl_utils_mpi_set_state
	jmp	LBB0_8
LBB0_7:
	movl	%eax, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AQ_NIC_WOL_ENABLED,4,2         ## @AQ_NIC_WOL_ENABLED
	.comm	_HAL_ATLANTIC_UTILS_FW_MSG_ENABLE_WAKEUP,4,2 ## @HAL_ATLANTIC_UTILS_FW_MSG_ENABLE_WAKEUP
	.comm	_MPI_POWER,4,2                  ## @MPI_POWER
	.no_dead_strip	_aq_fw1x_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aq_fw1x_set_power
_aq_fw1x_set_power:                     ; @aq_fw1x_set_power
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _AQ_NIC_WOL_ENABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AQ_NIC_WOL_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_aq_fw1x_set_wol
	tbnz	w0, #31, LBB0_6
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	bl	_hw_atl_utils_fw_rpc_wait
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x0, [sp, #8]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh3:
	adrp	x8, _HAL_ATLANTIC_UTILS_FW_MSG_ENABLE_WAKEUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HAL_ATLANTIC_UTILS_FW_MSG_ENABLE_WAKEUP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	mov	w10, #2
	stp	w10, w8, [x9]
	mov	x0, x19
	mov	w1, #8
	bl	_hw_atl_utils_fw_rpc_call
	mov	x20, x0
	tbz	w0, #31, LBB0_5
	b	LBB0_7
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	bl	_hw_atl_utils_mpi_set_speed
Lloh6:
	adrp	x8, _MPI_POWER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPI_POWER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hw_atl_utils_mpi_set_state
	b	LBB0_7
LBB0_6:
	mov	x20, x0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AQ_NIC_WOL_ENABLED,4,2         ; @AQ_NIC_WOL_ENABLED
	.comm	_HAL_ATLANTIC_UTILS_FW_MSG_ENABLE_WAKEUP,4,2 ; @HAL_ATLANTIC_UTILS_FW_MSG_ENABLE_WAKEUP
	.comm	_MPI_POWER,4,2                  ; @MPI_POWER
	.no_dead_strip	_aq_fw1x_set_power
.subsections_via_symbols
