	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_lsm6dsx_check_whoami
_st_lsm6dsx_check_whoami:               ## @st_lsm6dsx_check_whoami
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_st_lsm6dsx_sensor_settings@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	_ST_LSM6DSX_MAX_ID@GOTPCREL(%rip), %r15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	(%r15), %eax
	movq	(%r13), %rdi
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdx
	movq	%r14, %rcx
	shlq	$4, %rcx
	movq	8(%rdi,%rcx), %rcx
	leal	-1(%rax), %r12d
	incq	%r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%ebx, (%rcx)
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	incq	%r15
	addq	$16, %rcx
	cmpq	%r15, %rax
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r14
	jl	LBB0_3
## %bb.10:
	movq	%r12, %r15
	jmp	LBB0_11
LBB0_1:
	xorl	%r15d, %r15d
LBB0_11:
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r14d
	jne	LBB0_13
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%ebx, %edx
	jmp	LBB0_17
LBB0_13:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rbx), %edi
	movq	_ST_LSM6DSX_REG_WHOAMI_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movl	-44(%rbp), %edx
	movq	(%r13), %rcx
	movl	%r14d, %eax
	shlq	$4, %rax
	cmpl	(%rcx,%rax), %edx
	jne	LBB0_16
## %bb.18:
	movq	8(%rcx,%rax), %rcx
	movslq	%r15d, %rdx
	shlq	$4, %rdx
	movq	8(%rcx,%rdx), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx)
	addq	(%r13), %rax
	movq	%rax, (%rbx)
	xorl	%r12d, %r12d
	jmp	LBB0_19
LBB0_14:
	movl	%eax, %r12d
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_16:
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
LBB0_17:
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_19:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_st_lsm6dsx_sensor_settings,8,3 ## @st_lsm6dsx_sensor_settings
	.comm	_ST_LSM6DSX_MAX_ID,4,2          ## @ST_LSM6DSX_MAX_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported hw id [%02x]\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ST_LSM6DSX_REG_WHOAMI_ADDR,4,2 ## @ST_LSM6DSX_REG_WHOAMI_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"failed to read whoami register\n"

L_.str.2:                               ## @.str.2
	.asciz	"unsupported whoami [%02x]\n"

	.no_dead_strip	_st_lsm6dsx_check_whoami
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_lsm6dsx_check_whoami
_st_lsm6dsx_check_whoami:               ; @st_lsm6dsx_check_whoami
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _st_lsm6dsx_sensor_settings@GOTPAGE
Lloh1:
	ldr	x22, [x22, _st_lsm6dsx_sensor_settings@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x23, #0
Lloh2:
	adrp	x25, _ST_LSM6DSX_MAX_ID@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ST_LSM6DSX_MAX_ID@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	w8, [x25]
	ldr	x0, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, #0
	add	x9, x0, x23, lsl #4
	ldr	x9, [x9, #8]
	sub	w10, w8, #1
	add	x26, x10, #1
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x9]
	cmp	w10, w21
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	add	x24, x24, #1
	add	x9, x9, #16
	cmp	x8, x24
	b.ne	LBB0_4
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x26, #0
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_2
; %bb.8:
	mov	x24, x26
	b	LBB0_10
LBB0_9:
	mov	w23, #0
	mov	x24, #0
LBB0_10:
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.ne	LBB0_12
; %bb.11:
	ldr	w0, [x19, #8]
	str	x21, [sp]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_17
LBB0_12:
	ldr	w0, [x19, #12]
Lloh6:
	adrp	x8, _ST_LSM6DSX_REG_WHOAMI_ADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ST_LSM6DSX_REG_WHOAMI_ADDR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_15
; %bb.13:
	ldr	w8, [sp, #12]
	ldr	x10, [x22]
	mov	w9, w23
	lsl	x9, x9, #4
	ldr	w11, [x10, x9]
	cmp	w8, w11
	b.ne	LBB0_16
; %bb.14:
	mov	w21, #0
	add	x8, x10, x9
	ldr	x8, [x8, #8]
	lsl	x10, x24, #32
	add	x8, x8, x10, asr #28
	ldr	x8, [x8, #8]
	str	x8, [x20]
	ldr	x8, [x22]
	add	x8, x8, x9
	str	x8, [x19]
	b	LBB0_18
LBB0_15:
	mov	x21, x0
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_18
LBB0_16:
	ldr	w0, [x19, #8]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_17:
	bl	_dev_err
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_st_lsm6dsx_sensor_settings,8,3 ; @st_lsm6dsx_sensor_settings
	.comm	_ST_LSM6DSX_MAX_ID,4,2          ; @ST_LSM6DSX_MAX_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported hw id [%02x]\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ST_LSM6DSX_REG_WHOAMI_ADDR,4,2 ; @ST_LSM6DSX_REG_WHOAMI_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"failed to read whoami register\n"

l_.str.2:                               ; @.str.2
	.asciz	"unsupported whoami [%02x]\n"

	.no_dead_strip	_st_lsm6dsx_check_whoami
.subsections_via_symbols
