	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_lsm6dsx_shub_alloc_iiodev
_st_lsm6dsx_shub_alloc_iiodev:          ## @st_lsm6dsx_shub_alloc_iiodev
	.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
	movq	%r8, %r15
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %edi
	movl	$48, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r13
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r13)
	movl	(%r12), %eax
	movl	%eax, 32(%r13)
	movq	_st_lsm6dsx_ext_info@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r13)
	movq	%r13, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	movl	%r14d, (%rax)
	movq	%r12, 40(%rax)
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r15)
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	%rbx, 24(%r15)
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%r15)
	movl	$1, 4(%r15)
	cmpl	$128, (%rbx)
	jne	LBB0_4
## %bb.2:
	movq	_IIO_MAGN@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	4(%rbx), %esi
	movq	_IIO_MOD_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_ST_LSM6DSX_CHANNEL
	movl	%eax, -64(%rbp)
	movl	(%r14), %edi
	movl	4(%rbx), %esi
	addl	$2, %esi
	movq	_IIO_MOD_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %ecx
	callq	_ST_LSM6DSX_CHANNEL
	movl	%eax, -60(%rbp)
	movl	(%r14), %edi
	movl	4(%rbx), %esi
	addl	$4, %esi
	movq	_IIO_MOD_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$2, %ecx
	callq	_ST_LSM6DSX_CHANNEL
	movl	%eax, -56(%rbp)
	movl	$3, %edi
	callq	_IIO_CHAN_SOFT_TIMESTAMP
	movl	%eax, -52(%rbp)
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	leaq	-64(%rbp), %r14
	movq	%rax, %rdi
	movq	%r14, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	_st_lsm6dsx_available_scan_masks@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movq	%rbx, 8(%r13)
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, 4(%r13)
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	callq	_scnprintf
	movl	8(%r15), %eax
	movl	%eax, (%r13)
	jmp	LBB0_5
LBB0_4:
	xorl	%r13d, %r13d
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_st_lsm6dsx_ext_info,4,2        ## @st_lsm6dsx_ext_info
	.comm	_IIO_MAGN,4,2                   ## @IIO_MAGN
	.comm	_IIO_MOD_X,4,2                  ## @IIO_MOD_X
	.comm	_IIO_MOD_Y,4,2                  ## @IIO_MOD_Y
	.comm	_IIO_MOD_Z,4,2                  ## @IIO_MOD_Z
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_st_lsm6dsx_available_scan_masks,4,2 ## @st_lsm6dsx_available_scan_masks
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s_magn"

	.no_dead_strip	_st_lsm6dsx_shub_alloc_iiodev
.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_alloc_iiodev
_st_lsm6dsx_shub_alloc_iiodev:          ; @st_lsm6dsx_shub_alloc_iiodev
	.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	x20, x4
	mov	x24, x3
	mov	x23, x2
	mov	x25, 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, #24]
	ldr	w0, [x0]
	mov	w1, #48
	bl	_devm_iio_device_alloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _INDIO_DIRECT_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #36]
	ldr	w8, [x22]
	str	w8, [x19, #32]
Lloh6:
	adrp	x8, _st_lsm6dsx_ext_info@GOTPAGE
Lloh7:
	ldr	x8, [x8, _st_lsm6dsx_ext_info@GOTPAGEOFF]
	str	x8, [x19, #24]
	mov	x0, x19
	bl	_iio_priv
	str	w25, [x0]
	str	x22, [x0, #40]
	ldr	x8, [x23, #16]
	ldr	w8, [x8]
	str	w8, [x0, #36]
	ldr	x8, [x23, #8]
	ldr	w8, [x8]
	str	w8, [x0, #32]
	str	x23, [x0, #24]
	str	w24, [x0, #16]
	mov	w8, #1
	str	w8, [x0, #4]
	ldr	w8, [x23]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.2:
	mov	x21, x0
Lloh8:
	adrp	x24, _IIO_MAGN@GOTPAGE
Lloh9:
	ldr	x24, [x24, _IIO_MAGN@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w1, [x23, #4]
Lloh10:
	adrp	x8, _IIO_MOD_X@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IIO_MOD_X@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_ST_LSM6DSX_CHANNEL
	str	w0, [sp, #8]
	ldr	w0, [x24]
	ldr	w8, [x23, #4]
	add	w1, w8, #2
Lloh13:
	adrp	x8, _IIO_MOD_Y@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IIO_MOD_Y@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_ST_LSM6DSX_CHANNEL
	str	w0, [sp, #12]
	ldr	w0, [x24]
	ldr	w8, [x23, #4]
	add	w1, w8, #4
Lloh16:
	adrp	x8, _IIO_MOD_Z@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IIO_MOD_Z@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	w3, #2
	bl	_ST_LSM6DSX_CHANNEL
	str	w0, [sp, #16]
	mov	w0, #3
	bl	_IIO_CHAN_SOFT_TIMESTAMP
	str	w0, [sp, #20]
	ldr	w0, [x22]
Lloh19:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.3:
	mov	x22, x0
	add	x1, sp, #8
	mov	w2, #16
	bl	_memcpy
Lloh22:
	adrp	x8, _st_lsm6dsx_available_scan_masks@GOTPAGE
Lloh23:
	ldr	x8, [x8, _st_lsm6dsx_available_scan_masks@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	str	x22, [x19, #8]
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	str	w0, [x19, #4]
	ldr	w0, [x21, #8]
Lloh25:
	adrp	x2, l_.str@PAGE
Lloh26:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	mov	x3, x20
	bl	_scnprintf
	ldr	w8, [x21, #8]
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
	mov	x19, #0
LBB0_5:
	ldr	x8, [sp, #24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	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_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_st_lsm6dsx_ext_info,4,2        ; @st_lsm6dsx_ext_info
	.comm	_IIO_MAGN,4,2                   ; @IIO_MAGN
	.comm	_IIO_MOD_X,4,2                  ; @IIO_MOD_X
	.comm	_IIO_MOD_Y,4,2                  ; @IIO_MOD_Y
	.comm	_IIO_MOD_Z,4,2                  ; @IIO_MOD_Z
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_st_lsm6dsx_available_scan_masks,4,2 ; @st_lsm6dsx_available_scan_masks
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s_magn"

	.no_dead_strip	_st_lsm6dsx_shub_alloc_iiodev
.subsections_via_symbols
