	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_lsm6dsx_shub_read
_st_lsm6dsx_shub_read:                  ## @st_lsm6dsx_shub_read
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r15
	movq	(%r15), %r14
	movl	4(%r14), %esi
	xorl	%edi, %edi
	callq	_ST_LSM6DSX_SLV_ADDR
	movl	%eax, %esi
	movl	(%rbx), %eax
	addl	%eax, %eax
	incl	%eax
	movl	%eax, -60(%rbp)
	movl	%r13d, -56(%rbp)
	movq	_ST_LS6DSX_READ_OP_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	andl	%r12d, %eax
	movl	%eax, -52(%rbp)
	leaq	-60(%rbp), %rdx
	movq	%r15, %rdi
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	$12, %ecx
	callq	_st_lsm6dsx_shub_write_reg
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_st_lsm6dsx_shub_master_enable
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_st_lsm6dsx_shub_wait_complete
	movl	(%r14), %esi
	andl	(%r13), %r12d
	movq	%r15, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %ecx
	callq	_st_lsm6dsx_shub_read_reg
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_st_lsm6dsx_shub_master_enable
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	%r15, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdx
	movl	$12, %ecx
	callq	_st_lsm6dsx_shub_write_reg
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_LS6DSX_READ_OP_MASK,4,2     ## @ST_LS6DSX_READ_OP_MASK
	.no_dead_strip	_st_lsm6dsx_shub_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_lsm6dsx_shub_read
_st_lsm6dsx_shub_read:                  ; @st_lsm6dsx_shub_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x3
	mov	x22, x2
	mov	x24, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x19, [x0, #8]
	ldr	x25, [x19]
	ldr	w1, [x25, #4]
	mov	w0, #0
	bl	_ST_LSM6DSX_SLV_ADDR
	mov	x20, x0
	ldr	w8, [x21]
	mov	w9, #1
	bfi	w9, w8, #1, #31
	stp	w9, w24, [sp, #12]
Lloh3:
	adrp	x24, _ST_LS6DSX_READ_OP_MASK@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ST_LS6DSX_READ_OP_MASK@GOTPAGEOFF]
	ldr	w8, [x24]
	and	w8, w8, w23
	str	w8, [sp, #20]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #12
	bl	_st_lsm6dsx_shub_write_reg
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x21
	mov	w1, #1
	bl	_st_lsm6dsx_shub_master_enable
	tbnz	w0, #31, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_st_lsm6dsx_shub_wait_complete
	ldr	w1, [x25]
	ldr	w8, [x24]
	and	w3, w8, w23
	mov	x0, x19
	mov	x2, x22
	bl	_st_lsm6dsx_shub_read_reg
	mov	x0, x21
	mov	w1, #0
	bl	_st_lsm6dsx_shub_master_enable
	add	x0, sp, #12
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #12
	bl	_st_lsm6dsx_shub_write_reg
LBB0_3:
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_LS6DSX_READ_OP_MASK,4,2     ; @ST_LS6DSX_READ_OP_MASK
	.no_dead_strip	_st_lsm6dsx_shub_read
.subsections_via_symbols
