	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adxl345_write_raw
_adxl345_write_raw:                     ## @adxl345_write_raw
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %r12
	callq	_iio_priv
	movq	%rax, %r14
	cmpq	$128, %rbx
	je	LBB0_3
## %bb.1:
	cmpq	$129, %rbx
	jne	LBB0_4
## %bb.2:
	movl	(%r14), %ebx
	movl	(%r12), %edi
	callq	_ADXL345_REG_OFS_AXIS
	leal	3(%r13), %edx
	testl	%r13d, %r13d
	cmovnsl	%r13d, %edx
	sarl	$2, %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_write                   ## TAILCALL
LBB0_3:
	movq	_NHZ_PER_HZ@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	addl	%r15d, %r13d
	movq	_ADXL345_BASE_RATE_NANO_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_div_s64
	movl	(%r14), %r14d
	movq	_ADXL345_REG_BW_RATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	_ADXL345_BW_RATE@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movl	%eax, %edi
	callq	_ilog2
	movl	(%r12), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_clamp_val
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NHZ_PER_HZ,4,2                 ## @NHZ_PER_HZ
	.comm	_ADXL345_BASE_RATE_NANO_HZ,4,2  ## @ADXL345_BASE_RATE_NANO_HZ
	.comm	_ADXL345_REG_BW_RATE,4,2        ## @ADXL345_REG_BW_RATE
	.comm	_ADXL345_BW_RATE,4,2            ## @ADXL345_BW_RATE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_adxl345_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adxl345_write_raw
_adxl345_write_raw:                     ; @adxl345_write_raw
	.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	x23, x4
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	bl	_iio_priv
	mov	x20, x0
	cmp	x23, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	x23, #129
	b.ne	LBB0_4
; %bb.2:
	ldr	w20, [x20]
	ldr	w0, [x21]
	bl	_ADXL345_REG_OFS_AXIS
	mov	x1, x0
	add	w8, w19, #3
	cmp	w19, #0
	csel	w8, w8, w19, lt
	asr	w2, w8, #2
	mov	x0, x20
	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
	b	_regmap_write
LBB0_3:
Lloh0:
	adrp	x8, _NHZ_PER_HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NHZ_PER_HZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	madd	w0, w8, w19, w22
Lloh3:
	adrp	x8, _ADXL345_BASE_RATE_NANO_HZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADXL345_BASE_RATE_NANO_HZ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_div_s64
	ldr	w19, [x20]
Lloh6:
	adrp	x8, _ADXL345_REG_BW_RATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADXL345_REG_BW_RATE@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
Lloh9:
	adrp	x22, _ADXL345_BW_RATE@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ADXL345_BW_RATE@GOTPAGEOFF]
	ldr	w21, [x22]
	bl	_ilog2
	ldr	w2, [x22]
	mov	w1, #0
	bl	_clamp_val
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	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
	b	_regmap_update_bits
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	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
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NHZ_PER_HZ,4,2                 ; @NHZ_PER_HZ
	.comm	_ADXL345_BASE_RATE_NANO_HZ,4,2  ; @ADXL345_BASE_RATE_NANO_HZ
	.comm	_ADXL345_REG_BW_RATE,4,2        ; @ADXL345_REG_BW_RATE
	.comm	_ADXL345_BW_RATE,4,2            ; @ADXL345_BW_RATE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_adxl345_write_raw
.subsections_via_symbols
