	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ak8974_configure
_ak8974_configure:                      ## @ak8974_configure
	.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
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	movq	_AK8974_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AK8974_CTRL2_DRDY_EN@GOTPCREL(%rip), %rax
	movq	_AK8974_CTRL2_INT_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	8(%rbx), %edi
	movq	_AK8974_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	(%rbx), %rax
	movq	_AK8974_WHOAMI_VALUE_AMI306@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_AMI306_CTRL4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$41086, %edx                    ## imm = 0xA07E
	callq	_ak8974_set_u16_val
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	movl	8(%rbx), %edi
	movq	_AK8974_INT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AK8974_INT_CTRL_POL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movl	8(%rbx), %edi
	movq	_AK8974_PRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_regmap_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AK8974_CTRL2,4,2               ## @AK8974_CTRL2
	.comm	_AK8974_CTRL2_DRDY_EN,4,2       ## @AK8974_CTRL2_DRDY_EN
	.comm	_AK8974_CTRL2_INT_EN,4,2        ## @AK8974_CTRL2_INT_EN
	.comm	_AK8974_CTRL3,4,2               ## @AK8974_CTRL3
	.comm	_AK8974_WHOAMI_VALUE_AMI306,8,3 ## @AK8974_WHOAMI_VALUE_AMI306
	.comm	_AMI306_CTRL4,4,2               ## @AMI306_CTRL4
	.comm	_AK8974_INT_CTRL,4,2            ## @AK8974_INT_CTRL
	.comm	_AK8974_INT_CTRL_POL,4,2        ## @AK8974_INT_CTRL_POL
	.comm	_AK8974_PRESET,4,2              ## @AK8974_PRESET
	.no_dead_strip	_ak8974_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ak8974_configure
_ak8974_configure:                      ; @ak8974_configure
	.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
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _AK8974_CTRL2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AK8974_CTRL2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AK8974_CTRL2_DRDY_EN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AK8974_CTRL2_DRDY_EN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _AK8974_CTRL2_INT_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AK8974_CTRL2_INT_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_regmap_write
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x8, _AK8974_CTRL3@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AK8974_CTRL3@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_regmap_write
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _AK8974_WHOAMI_VALUE_AMI306@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AK8974_WHOAMI_VALUE_AMI306@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _AMI306_CTRL4@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AMI306_CTRL4@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #41086
	bl	_ak8974_set_u16_val
	cbnz	w0, LBB0_5
LBB0_4:
	ldr	w0, [x19, #8]
Lloh18:
	adrp	x8, _AK8974_INT_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AK8974_INT_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _AK8974_INT_CTRL_POL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AK8974_INT_CTRL_POL@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	bl	_regmap_write
	cbz	w0, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x19, #8]
Lloh24:
	adrp	x8, _AK8974_PRESET@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AK8974_PRESET@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_regmap_write
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AK8974_CTRL2,4,2               ; @AK8974_CTRL2
	.comm	_AK8974_CTRL2_DRDY_EN,4,2       ; @AK8974_CTRL2_DRDY_EN
	.comm	_AK8974_CTRL2_INT_EN,4,2        ; @AK8974_CTRL2_INT_EN
	.comm	_AK8974_CTRL3,4,2               ; @AK8974_CTRL3
	.comm	_AK8974_WHOAMI_VALUE_AMI306,8,3 ; @AK8974_WHOAMI_VALUE_AMI306
	.comm	_AMI306_CTRL4,4,2               ; @AMI306_CTRL4
	.comm	_AK8974_INT_CTRL,4,2            ; @AK8974_INT_CTRL
	.comm	_AK8974_INT_CTRL_POL,4,2        ; @AK8974_INT_CTRL_POL
	.comm	_AK8974_PRESET,4,2              ; @AK8974_PRESET
	.no_dead_strip	_ak8974_configure
.subsections_via_symbols
