	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_lsm6dsx_shub_write
_st_lsm6dsx_shub_write:                 ## @st_lsm6dsx_shub_write
	.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, -64(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r14
	movq	(%r14), %r13
	cmpq	$0, 16(%r13)
	je	LBB0_2
## %bb.1:
	movl	8(%r13), %esi
	movl	$1, %edi
	callq	_ST_LSM6DSX_SHIFT_VAL
	movq	16(%r13), %rsi
	movl	8(%r13), %edx
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_st_lsm6dsx_shub_write_reg_with_mask
	testl	%eax, %eax
	js	LBB0_9
LBB0_2:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %esi
	xorl	%edi, %edi
	callq	_ST_LSM6DSX_SLV_ADDR
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%r12), %eax
	addl	%eax, %eax
	movl	%eax, -56(%rbp)
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	movl	%eax, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -52(%rbp)
	movq	%r14, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	leaq	-56(%rbp), %rdx
	movl	$8, %ecx
	callq	_st_lsm6dsx_shub_write_reg
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_st_lsm6dsx_shub_write_reg
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_st_lsm6dsx_shub_master_enable
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_st_lsm6dsx_shub_wait_complete
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_st_lsm6dsx_shub_master_enable
	incl	%ebx
	addq	$4, %r15
	decq	%r13
	jne	LBB0_4
LBB0_8:
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%r14, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdx
	movl	$8, %ecx
	callq	_st_lsm6dsx_shub_write_reg
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_st_lsm6dsx_shub_write
.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_write
_st_lsm6dsx_shub_write:                 ; @st_lsm6dsx_shub_write
	.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	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	x19, [x0, #8]
	ldr	x25, [x19]
	ldr	x8, [x25, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w1, [x25, #8]
	mov	w0, #1
	bl	_ST_LSM6DSX_SHIFT_VAL
	mov	x3, x0
	ldr	x1, [x25, #16]
	ldr	w2, [x25, #8]
	mov	x0, x19
	bl	_st_lsm6dsx_shub_write_reg_with_mask
	tbnz	w0, #31, LBB0_9
LBB0_2:
	ldr	w1, [x25, #4]
	mov	w0, #0
	bl	_ST_LSM6DSX_SLV_ADDR
	mov	x23, x0
	ldr	w8, [x22]
	lsl	w8, w8, #1
	str	w8, [sp]
	cmp	w24, #1
	b.lt	LBB0_8
; %bb.3:
	mov	w24, w24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	w21, [sp, #4]
	mov	x2, sp
	mov	x0, x19
	mov	x1, x23
	mov	w3, #8
	bl	_st_lsm6dsx_shub_write_reg
	tbnz	w0, #31, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #1
	bl	_st_lsm6dsx_shub_write_reg
	tbnz	w0, #31, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	w1, #1
	bl	_st_lsm6dsx_shub_master_enable
	tbnz	w0, #31, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_st_lsm6dsx_shub_wait_complete
	mov	x0, x22
	mov	w1, #0
	bl	_st_lsm6dsx_shub_master_enable
	add	w21, w21, #1
	add	x20, x20, #4
	subs	x24, x24, #1
	b.ne	LBB0_4
LBB0_8:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x2, sp
	mov	x0, x19
	mov	x1, x23
	mov	w3, #8
	bl	_st_lsm6dsx_shub_write_reg
LBB0_9:
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	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
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_st_lsm6dsx_shub_write
.subsections_via_symbols
