	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adxrs450_spi_write_reg_16
_adxrs450_spi_write_reg_16:             ## @adxrs450_spi_write_reg_16
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	callq	_iio_priv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	_ADXRS450_WRITE_DATA@GOTPCREL(%rip), %rax
	movl	%r14d, %ecx
	shll	$17, %ecx
	addl	%ebx, %ebx
	orl	%ecx, %ebx
	orl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_hweight32
	xorl	%edi, %edi
	testb	$1, %al
	jne	LBB0_2
## %bb.1:
	movq	_ADXRS450_P@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_2:
	orl	%ebx, %edi
	callq	_cpu_to_be32
	leaq	16(%r15), %rsi
	movl	%eax, 16(%r15)
	movq	8(%r15), %rdi
	movl	$4, %edx
	callq	_spi_write
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
LBB0_4:
	movl	$100, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADXRS450_WRITE_DATA,4,2        ## @ADXRS450_WRITE_DATA
	.comm	_ADXRS450_P,4,2                 ## @ADXRS450_P
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"problem while writing 16 bit register 0x%02x\n"

	.no_dead_strip	_adxrs450_spi_write_reg_16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adxrs450_spi_write_reg_16
_adxrs450_spi_write_reg_16:             ; @adxrs450_spi_write_reg_16
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x20, x1
	bl	_iio_priv
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _ADXRS450_WRITE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADXRS450_WRITE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w9, w21, #1
	orr	w9, w9, w20, lsl #17
	orr	w21, w9, w8
	mov	x0, x21
	bl	_hweight32
Lloh3:
	adrp	x8, _ADXRS450_P@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADXRS450_P@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w0, #0x1
	csel	w8, w8, wzr, eq
	orr	w0, w8, w21
	bl	_cpu_to_be32
	mov	x1, x19
	str	w0, [x1, #16]!
	ldr	x0, [x19, #8]
	mov	w2, #4
	bl	_spi_write
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_2:
	mov	w0, #100
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ADXRS450_WRITE_DATA,4,2        ; @ADXRS450_WRITE_DATA
	.comm	_ADXRS450_P,4,2                 ; @ADXRS450_P
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"problem while writing 16 bit register 0x%02x\n"

	.no_dead_strip	_adxrs450_spi_write_reg_16
.subsections_via_symbols
