	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ak8974_set_power
_ak8974_set_power:                      ## @ak8974_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movl	%esi, %edx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_AK8974_CTRL1_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_2:
	movq	_AK8974_CTRL1_FORCE_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%rdi), %edi
	movq	_AK8974_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.3:
	testl	%ecx, %ecx
	js	LBB0_5
## %bb.4:
	movq	_AK8974_ACTIVATE_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AK8974_CTRL1_POWER,4,2         ## @AK8974_CTRL1_POWER
	.comm	_AK8974_CTRL1_FORCE_EN,4,2      ## @AK8974_CTRL1_FORCE_EN
	.comm	_AK8974_CTRL1,4,2               ## @AK8974_CTRL1
	.comm	_AK8974_ACTIVATE_DELAY,4,2      ## @AK8974_ACTIVATE_DELAY
	.no_dead_strip	_ak8974_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ak8974_set_power
_ak8974_set_power:                      ; @ak8974_set_power
	.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, x1
Lloh0:
	adrp	x8, _AK8974_CTRL1_POWER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AK8974_CTRL1_POWER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w1, #0
	csel	w8, wzr, w8, eq
Lloh3:
	adrp	x9, _AK8974_CTRL1_FORCE_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AK8974_CTRL1_FORCE_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w0, [x0]
Lloh6:
	adrp	x8, _AK8974_CTRL1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AK8974_CTRL1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	x8, x0
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	cbz	w19, LBB0_3
; %bb.1:
	tbnz	w8, #31, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _AK8974_ACTIVATE_DELAY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AK8974_ACTIVATE_DELAY@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_msleep
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AK8974_CTRL1_POWER,4,2         ; @AK8974_CTRL1_POWER
	.comm	_AK8974_CTRL1_FORCE_EN,4,2      ; @AK8974_CTRL1_FORCE_EN
	.comm	_AK8974_CTRL1,4,2               ; @AK8974_CTRL1
	.comm	_AK8974_ACTIVATE_DELAY,4,2      ; @AK8974_ACTIVATE_DELAY
	.no_dead_strip	_ak8974_set_power
.subsections_via_symbols
