	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fxas21002c_chip_init
_fxas21002c_chip_init:                  ## @fxas21002c_chip_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_regmap_get_device
	movq	%rax, %r14
	movq	8(%r15), %rax
	movq	_F_WHO_AM_I@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	-28(%rbp), %rsi
	callq	_regmap_field_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movl	-28(%rbp), %edx
	movq	_FXAS21002C_CHIP_ID_1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_5
## %bb.2:
	movq	_FXAS21002C_CHIP_ID_2@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	movl	%edx, (%r15)
	movq	_FXAS21002C_MODE_STANDBY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_fxas21002c_mode_set
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	movl	$200, %esi
	callq	_fxas21002c_odr_set
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_9
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_F_WHO_AM_I,8,3                 ## @F_WHO_AM_I
	.comm	_FXAS21002C_CHIP_ID_1,4,2       ## @FXAS21002C_CHIP_ID_1
	.comm	_FXAS21002C_CHIP_ID_2,4,2       ## @FXAS21002C_CHIP_ID_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chip id 0x%02x is not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FXAS21002C_MODE_STANDBY,4,2    ## @FXAS21002C_MODE_STANDBY
L_.str.1:                               ## @.str.1
	.asciz	"failed to set ODR: %d\n"

	.no_dead_strip	_fxas21002c_chip_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fxas21002c_chip_init
_fxas21002c_chip_init:                  ; @fxas21002c_chip_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldr	w0, [x0, #16]
	bl	_regmap_get_device
	mov	x19, x0
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _F_WHO_AM_I@GOTPAGE
Lloh1:
	ldr	x9, [x9, _F_WHO_AM_I@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	add	x1, sp, #12
	bl	_regmap_field_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w2, [sp, #12]
Lloh3:
	adrp	x8, _FXAS21002C_CHIP_ID_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FXAS21002C_CHIP_ID_1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _FXAS21002C_CHIP_ID_2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FXAS21002C_CHIP_ID_2@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w2, w8
	ccmp	w2, w9, #4, ne
	b.ne	LBB0_6
; %bb.2:
	str	w2, [x20]
Lloh9:
	adrp	x8, _FXAS21002C_MODE_STANDBY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FXAS21002C_MODE_STANDBY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fxas21002c_mode_set
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x0, x20
	mov	w1, #200
	bl	_fxas21002c_odr_set
	mov	x21, x0
	tbz	w0, #31, LBB0_7
; %bb.4:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_7
LBB0_5:
	mov	x21, x0
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_F_WHO_AM_I,8,3                 ; @F_WHO_AM_I
	.comm	_FXAS21002C_CHIP_ID_1,4,2       ; @FXAS21002C_CHIP_ID_1
	.comm	_FXAS21002C_CHIP_ID_2,4,2       ; @FXAS21002C_CHIP_ID_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chip id 0x%02x is not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FXAS21002C_MODE_STANDBY,4,2    ; @FXAS21002C_MODE_STANDBY
l_.str.1:                               ; @.str.1
	.asciz	"failed to set ODR: %d\n"

	.no_dead_strip	_fxas21002c_chip_init
.subsections_via_symbols
