	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_lsm6dsx_fifo_setup          ## -- Begin function st_lsm6dsx_fifo_setup
	.p2align	4, 0x90
_st_lsm6dsx_fifo_setup:                 ## @st_lsm6dsx_fifo_setup
	.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	%rdi, %r12
	movq	8(%rdi), %rax
	movq	8(%rax), %rbx
	movl	16(%rdi), %edi
	callq	_irq_get_irq_data
	movl	%eax, %edi
	callq	_irqd_get_trigger_type
	movq	%rax, %r14
	addq	$-128, %rax
	cmpq	$4, %rax
	jae	LBB0_10
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	L_switch.table.st_lsm6dsx_fifo_setup(%rip), %rax
	movl	-512(%rax,%r14,4), %esi
	movl	20(%r12), %r13d
	movq	_ST_LSM6DSX_REG_HLACTIVE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ST_LSM6DSX_REG_HLACTIVE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_FIELD_PREP
	movl	%r13d, %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movq	8(%r12), %rax
	movq	(%rax), %rbx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	callq	_of_property_read_bool
	testq	%rax, %rax
	jne	LBB0_6
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.5:
	cmpq	$0, (%rbx)
	je	LBB0_8
LBB0_6:
	movl	20(%r12), %r15d
	movq	_ST_LSM6DSX_REG_PP_OD_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ST_LSM6DSX_REG_PP_OD_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_12
## %bb.7:
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orq	%rax, %r14
LBB0_8:
	movq	8(%r12), %rdi
	movl	16(%r12), %esi
	movq	_st_lsm6dsx_handler_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_st_lsm6dsx_handler_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	orq	(%rax), %r14
	movq	%r12, (%rsp)
	leaq	L_.str.2(%rip), %r9
	movq	%r14, %r8
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movl	%eax, %ebx
	movq	8(%r12), %rdi
	movl	16(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_21
LBB0_10:
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_12:
	movl	%eax, %ebx
	jmp	LBB0_21
LBB0_13:
	movq	_ST_LSM6DSX_ID_MAX@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_20
## %bb.14:
	movq	(%r12), %rcx
	xorl	%ebx, %ebx
	movq	_INDIO_BUFFER_SOFTWARE@GOTPCREL(%rip), %r15
	movq	_st_lsm6dsx_buffer_ops@GOTPCREL(%rip), %r13
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%rbx
	movslq	%eax, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_20
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	8(%r12), %rdi
	callq	_devm_iio_kfifo_allocate
	testq	%rax, %rax
	je	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	movq	%rax, %rsi
	callq	_iio_device_attach_buffer
	movl	(%r15), %eax
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdx
	orl	%eax, 8(%rdx)
	movq	%r13, (%rdx)
	movl	(%r14), %eax
	jmp	LBB0_15
LBB0_20:
	xorl	%ebx, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mode %lx unsupported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ST_LSM6DSX_REG_HLACTIVE_ADDR,4,2 ## @ST_LSM6DSX_REG_HLACTIVE_ADDR
	.comm	_ST_LSM6DSX_REG_HLACTIVE_MASK,4,2 ## @ST_LSM6DSX_REG_HLACTIVE_MASK
L_.str.1:                               ## @.str.1
	.asciz	"drive-open-drain"

	.comm	_ST_LSM6DSX_REG_PP_OD_ADDR,4,2  ## @ST_LSM6DSX_REG_PP_OD_ADDR
	.comm	_ST_LSM6DSX_REG_PP_OD_MASK,4,2  ## @ST_LSM6DSX_REG_PP_OD_MASK
	.comm	_IRQF_SHARED,8,3                ## @IRQF_SHARED
	.comm	_st_lsm6dsx_handler_irq,4,2     ## @st_lsm6dsx_handler_irq
	.comm	_st_lsm6dsx_handler_thread,4,2  ## @st_lsm6dsx_handler_thread
	.comm	_IRQF_ONESHOT,8,3               ## @IRQF_ONESHOT
L_.str.2:                               ## @.str.2
	.asciz	"lsm6dsx"

L_.str.3:                               ## @.str.3
	.asciz	"failed to request trigger irq %d\n"

	.comm	_ST_LSM6DSX_ID_MAX,4,2          ## @ST_LSM6DSX_ID_MAX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INDIO_BUFFER_SOFTWARE,4,2      ## @INDIO_BUFFER_SOFTWARE
	.comm	_st_lsm6dsx_buffer_ops,4,2      ## @st_lsm6dsx_buffer_ops
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.st_lsm6dsx_fifo_setup
L_switch.table.st_lsm6dsx_fifo_setup:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_lsm6dsx_fifo_setup          ; -- Begin function st_lsm6dsx_fifo_setup
	.p2align	2
_st_lsm6dsx_fifo_setup:                 ; @st_lsm6dsx_fifo_setup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x21, [x8, #8]
	ldr	w0, [x0, #16]
	bl	_irq_get_irq_data
	bl	_irqd_get_trigger_type
	mov	x20, x0
	sub	x8, x0, #128
	cmp	x8, #4
	b.hs	LBB0_10
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.st_lsm6dsx_fifo_setup@PAGE
Lloh1:
	add	x9, x9, l_switch.table.st_lsm6dsx_fifo_setup@PAGEOFF
	ldr	w1, [x9, x8, lsl #2]
	ldr	w22, [x19, #20]
Lloh2:
	adrp	x8, _ST_LSM6DSX_REG_HLACTIVE_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ST_LSM6DSX_REG_HLACTIVE_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
Lloh5:
	adrp	x8, _ST_LSM6DSX_REG_HLACTIVE_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ST_LSM6DSX_REG_HLACTIVE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	mov	x0, x24
	bl	_FIELD_PREP
	mov	x3, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_12
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x22, [x8]
	cbz	x21, LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_bool
	cbnz	x0, LBB0_6
LBB0_4:
	cbz	x22, LBB0_8
; %bb.5:
	ldr	x8, [x22]
	cbz	x8, LBB0_8
LBB0_6:
	ldr	w21, [x19, #20]
Lloh10:
	adrp	x8, _ST_LSM6DSX_REG_PP_OD_ADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ST_LSM6DSX_REG_PP_OD_ADDR@GOTPAGEOFF]
Lloh12:
	ldr	w22, [x8]
Lloh13:
	adrp	x8, _ST_LSM6DSX_REG_PP_OD_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ST_LSM6DSX_REG_PP_OD_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w23, [x8]
	mov	x0, x23
	mov	w1, #1
	bl	_FIELD_PREP
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_12
; %bb.7:
Lloh16:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	orr	x20, x8, x20
LBB0_8:
	ldr	x0, [x19, #8]
	ldr	w1, [x19, #16]
Lloh19:
	adrp	x8, _st_lsm6dsx_handler_irq@GOTPAGE
Lloh20:
	ldr	x8, [x8, _st_lsm6dsx_handler_irq@GOTPAGEOFF]
Lloh21:
	adrp	x9, _st_lsm6dsx_handler_thread@GOTPAGE
Lloh22:
	ldr	x9, [x9, _st_lsm6dsx_handler_thread@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
Lloh24:
	ldr	w3, [x9]
Lloh25:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	orr	x4, x8, x20
Lloh28:
	adrp	x5, l_.str.2@PAGE
Lloh29:
	add	x5, x5, l_.str.2@PAGEOFF
	mov	x6, x19
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_13
; %bb.9:
	mov	x22, x0
	ldr	x0, [x19, #8]
	ldr	w2, [x19, #16]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_20
LBB0_10:
	ldr	x0, [x19, #8]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_info
Lloh34:
	adrp	x8, _EINVAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_20
LBB0_12:
	mov	x22, x0
	b	LBB0_20
LBB0_13:
Lloh36:
	adrp	x20, _ST_LSM6DSX_ID_MAX@GOTPAGE
Lloh37:
	ldr	x20, [x20, _ST_LSM6DSX_ID_MAX@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_19
; %bb.14:
	mov	x21, #0
	ldr	x8, [x19]
Lloh38:
	adrp	x22, _INDIO_BUFFER_SOFTWARE@GOTPAGE
Lloh39:
	ldr	x22, [x22, _INDIO_BUFFER_SOFTWARE@GOTPAGEOFF]
Lloh40:
	adrp	x23, _st_lsm6dsx_buffer_ops@GOTPAGE
Lloh41:
	ldr	x23, [x23, _st_lsm6dsx_buffer_ops@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x21, x21, #1
	cmp	x21, w9, sxtw
	b.ge	LBB0_19
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8, x21, lsl #3]
	cbz	x10, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x0, [x19, #8]
	bl	_devm_iio_kfifo_allocate
	cbz	x0, LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x1, x0
	ldr	x8, [x19]
	lsl	x24, x21, #3
	ldr	x0, [x8, x24]
	bl	_iio_device_attach_buffer
	ldr	x8, [x19]
	ldr	x9, [x8, x24]
	ldr	w10, [x22]
	ldr	w11, [x9, #8]
	orr	w10, w11, w10
	str	w10, [x9, #8]
	str	x23, [x9]
	ldr	w9, [x20]
	b	LBB0_15
LBB0_19:
	mov	w22, #0
LBB0_20:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_21:
Lloh42:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mode %lx unsupported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ST_LSM6DSX_REG_HLACTIVE_ADDR,4,2 ; @ST_LSM6DSX_REG_HLACTIVE_ADDR
	.comm	_ST_LSM6DSX_REG_HLACTIVE_MASK,4,2 ; @ST_LSM6DSX_REG_HLACTIVE_MASK
l_.str.1:                               ; @.str.1
	.asciz	"drive-open-drain"

	.comm	_ST_LSM6DSX_REG_PP_OD_ADDR,4,2  ; @ST_LSM6DSX_REG_PP_OD_ADDR
	.comm	_ST_LSM6DSX_REG_PP_OD_MASK,4,2  ; @ST_LSM6DSX_REG_PP_OD_MASK
	.comm	_IRQF_SHARED,8,3                ; @IRQF_SHARED
	.comm	_st_lsm6dsx_handler_irq,4,2     ; @st_lsm6dsx_handler_irq
	.comm	_st_lsm6dsx_handler_thread,4,2  ; @st_lsm6dsx_handler_thread
	.comm	_IRQF_ONESHOT,8,3               ; @IRQF_ONESHOT
l_.str.2:                               ; @.str.2
	.asciz	"lsm6dsx"

l_.str.3:                               ; @.str.3
	.asciz	"failed to request trigger irq %d\n"

	.comm	_ST_LSM6DSX_ID_MAX,4,2          ; @ST_LSM6DSX_ID_MAX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INDIO_BUFFER_SOFTWARE,4,2      ; @INDIO_BUFFER_SOFTWARE
	.comm	_st_lsm6dsx_buffer_ops,4,2      ; @st_lsm6dsx_buffer_ops
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.st_lsm6dsx_fifo_setup
l_switch.table.st_lsm6dsx_fifo_setup:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	1                               ; 0x1

.subsections_via_symbols
