	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_lsm6dsx_read_tagged_fifo    ## -- Begin function st_lsm6dsx_read_tagged_fifo
	.p2align	4, 0x90
_st_lsm6dsx_read_tagged_fifo:           ## @st_lsm6dsx_read_tagged_fifo
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ST_LSM6DSX_TAGGED_SAMPLE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r15d
	imull	(%rdi), %r15d
	movq	_ST_LSM6DSX_IIO_BUFF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	24(%r12), %rax
	movl	4(%rax), %esi
	leaq	-72(%rbp), %rdx
	movq	%r12, %rdi
	movl	$4, %ecx
	callq	_st_lsm6dsx_read_locked
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movq	24(%r12), %rax
	movl	(%rax), %r14d
	movl	-72(%rbp), %edi
	callq	_le16_to_cpu
	andl	%r14d, %eax
	imull	(%rbx), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	jle	LBB0_14
## %bb.3:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	addl	%r15d, %r14d
	cmpl	-60(%rbp), %r14d                ## 4-byte Folded Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jge	LBB0_15
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	_ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rdx
	movq	_ST_LSM6DSX_MAX_TAGGED_WORD_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	movl	%r15d, %ecx
	callq	_st_lsm6dsx_read_block
	testl	%eax, %eax
	js	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	jle	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=2
	movq	%r13, %rdi
	movq	%r15, %rdx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	callq	_st_lsm6dsx_push_tagged_data
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=2
	addl	(%rbx), %r14d
	movl	-68(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r15d, %r14d
	jge	LBB0_4
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_ST_LSM6DSX_TAG_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	movslq	%r14d, %r12
	addq	%r12, %rsi
	shlq	$2, %rsi
	addq	8(%r13), %rsi
	movq	_ST_LSM6DSX_SAMPLE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_memcpy
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %esi
	sarl	$3, %esi
	movq	_ST_LSM6DSX_TS_TAG@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%r15), %edi
	callq	_le32_to_cpu
	cmpl	$-65536, %eax                   ## imm = 0xFFFF0000
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %esi
	movl	$1, %edx
	cmovael	%edx, %esi
	testl	%ecx, %ecx
	cmovel	%esi, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	_ST_LSM6DSX_TS_SENSITIVITY@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_9
LBB0_12:
	movl	%eax, %r14d
	movl	16(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	jmp	LBB0_19
LBB0_13:
	xorl	%r14d, %r14d
	jmp	LBB0_20
LBB0_14:
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
LBB0_15:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	movq	%r12, %rdi
	callq	_st_lsm6dsx_reset_hw_ts
	testl	%eax, %eax
	jns	LBB0_20
## %bb.17:
	movl	%eax, %r14d
	jmp	LBB0_20
LBB0_18:
	movl	16(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	movl	%eax, %r14d
LBB0_19:
	callq	_dev_err
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_LSM6DSX_TAGGED_SAMPLE_SIZE,4,2 ## @ST_LSM6DSX_TAGGED_SAMPLE_SIZE
	.comm	_ST_LSM6DSX_IIO_BUFF_SIZE,4,2   ## @ST_LSM6DSX_IIO_BUFF_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read fifo status (err=%d)\n"

	.comm	_ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR,4,2 ## @ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR
	.comm	_ST_LSM6DSX_MAX_TAGGED_WORD_LEN,4,2 ## @ST_LSM6DSX_MAX_TAGGED_WORD_LEN
L_.str.1:                               ## @.str.1
	.asciz	"failed to read pattern from fifo (err=%d)\n"

	.comm	_ST_LSM6DSX_TAG_SIZE,4,2        ## @ST_LSM6DSX_TAG_SIZE
	.comm	_ST_LSM6DSX_SAMPLE_SIZE,4,2     ## @ST_LSM6DSX_SAMPLE_SIZE
	.comm	_ST_LSM6DSX_TS_TAG,4,2          ## @ST_LSM6DSX_TS_TAG
	.comm	_ST_LSM6DSX_TS_SENSITIVITY,4,2  ## @ST_LSM6DSX_TS_SENSITIVITY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_lsm6dsx_read_tagged_fifo    ; -- Begin function st_lsm6dsx_read_tagged_fifo
	.p2align	2
_st_lsm6dsx_read_tagged_fifo:           ; @st_lsm6dsx_read_tagged_fifo
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	w20, [x0]
Lloh3:
	adrp	x26, _ST_LSM6DSX_TAGGED_SAMPLE_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ST_LSM6DSX_TAGGED_SAMPLE_SIZE@GOTPAGEOFF]
	ldr	w23, [x26]
Lloh5:
	adrp	x8, _ST_LSM6DSX_IIO_BUFF_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ST_LSM6DSX_IIO_BUFF_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x8, [x0, #24]
	ldr	w1, [x8, #4]
	sub	x2, x29, #92
	mov	w3, #4
	bl	_st_lsm6dsx_read_locked
	tbnz	w0, #31, LBB0_12
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	w22, [x8]
	ldur	w0, [x29, #-92]
	bl	_le16_to_cpu
	and	w8, w0, w22
	ldr	w9, [x26]
	mul	w8, w8, w9
	cbz	w8, LBB0_13
; %bb.2:
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.3:
	mov	w24, #0
	mov	w25, #0
	mov	w22, #0
Lloh10:
	adrp	x28, _ST_LSM6DSX_TAG_SIZE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _ST_LSM6DSX_TAG_SIZE@GOTPAGEOFF]
Lloh12:
	adrp	x27, _ST_LSM6DSX_SAMPLE_SIZE@GOTPAGE
Lloh13:
	ldr	x27, [x27, _ST_LSM6DSX_SAMPLE_SIZE@GOTPAGEOFF]
	mul	w23, w23, w20
Lloh14:
	adrp	x20, _ST_LSM6DSX_TS_TAG@GOTPAGE
Lloh15:
	ldr	x20, [x20, _ST_LSM6DSX_TS_TAG@GOTPAGEOFF]
	stur	w8, [x29, #-100]                ; 4-byte Folded Spill
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	w8, w25, [x29, #-100]           ; 8-byte Folded Reload
	add	w25, w25, w23
	cmp	w25, w8
	b.ge	LBB0_15
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	stur	w25, [x29, #-96]                ; 4-byte Folded Spill
Lloh16:
	adrp	x8, _ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
Lloh19:
	adrp	x8, _ST_LSM6DSX_MAX_TAGGED_WORD_LEN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ST_LSM6DSX_MAX_TAGGED_WORD_LEN@GOTPAGEOFF]
Lloh21:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x3, x23
	bl	_st_lsm6dsx_read_block
	tbnz	w0, #31, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w23, #1
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w25, #0
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x19
	mov	x2, x21
	mov	x3, x24
	bl	_st_lsm6dsx_push_tagged_data
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x26]
	add	w25, w8, w25
	cmp	w25, w23
	b.ge	LBB0_4
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	ldr	w9, [x28]
	add	w9, w9, w25
	add	x1, x8, w9, sxtw #2
	ldr	w2, [x27]
	mov	x0, x21
	bl	_memcpy
	ldr	x8, [x19, #8]
	ldr	w8, [x8, w25, sxtw #2]
	asr	w1, w8, #3
	ldr	w8, [x20]
	cmp	w1, w8
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w0, [x21]
	bl	_le32_to_cpu
	mov	w8, #-65537
	cmp	w0, w8
	ccmp	w22, #0, #0, hi
	csinc	w22, w22, wzr, ne
Lloh22:
	adrp	x8, _ST_LSM6DSX_TS_SENSITIVITY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ST_LSM6DSX_TS_SENSITIVITY@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	mul	w24, w8, w0
	b	LBB0_9
LBB0_12:
	mov	x25, x0
	ldr	w0, [x19, #16]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_19
LBB0_13:
	mov	w25, #0
	b	LBB0_20
LBB0_14:
	mov	w22, #0
	mov	w25, #0
LBB0_15:
	mov	x0, x22
	bl	_unlikely
	cbz	x0, LBB0_20
; %bb.16:
	mov	x0, x19
	bl	_st_lsm6dsx_reset_hw_ts
	tbz	w0, #31, LBB0_20
; %bb.17:
	mov	x25, x0
	b	LBB0_20
LBB0_18:
	mov	x25, x0
	ldr	w0, [x19, #16]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_19:
	mov	x2, x25
	bl	_dev_err
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x25
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_LSM6DSX_TAGGED_SAMPLE_SIZE,4,2 ; @ST_LSM6DSX_TAGGED_SAMPLE_SIZE
	.comm	_ST_LSM6DSX_IIO_BUFF_SIZE,4,2   ; @ST_LSM6DSX_IIO_BUFF_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read fifo status (err=%d)\n"

	.comm	_ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR,4,2 ; @ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR
	.comm	_ST_LSM6DSX_MAX_TAGGED_WORD_LEN,4,2 ; @ST_LSM6DSX_MAX_TAGGED_WORD_LEN
l_.str.1:                               ; @.str.1
	.asciz	"failed to read pattern from fifo (err=%d)\n"

	.comm	_ST_LSM6DSX_TAG_SIZE,4,2        ; @ST_LSM6DSX_TAG_SIZE
	.comm	_ST_LSM6DSX_SAMPLE_SIZE,4,2     ; @ST_LSM6DSX_SAMPLE_SIZE
	.comm	_ST_LSM6DSX_TS_TAG,4,2          ; @ST_LSM6DSX_TS_TAG
	.comm	_ST_LSM6DSX_TS_SENSITIVITY,4,2  ; @ST_LSM6DSX_TS_SENSITIVITY
.subsections_via_symbols
