	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adxl372_setup
_adxl372_setup:                         ## @adxl372_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_ADXL372_DEVID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movl	-12(%rbp), %edx
	movq	_ADXL372_DEVID_VAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_2
## %bb.3:
	movl	(%rbx), %edi
	movq	_ADXL372_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADXL372_RESET_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	_ADXL372_STANDBY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_adxl372_set_op_mode
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movq	_ADXL372_ACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_adxl372_set_activity_threshold
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movq	_ADXL372_INACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movl	$100, %r8d
	callq	_adxl372_set_activity_threshold
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:
	movq	_ADXL372_LOOPED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_adxl372_set_act_proc_mode
	testl	%eax, %eax
	js	LBB0_13
## %bb.8:
	movq	_ADXL372_ODR_6400HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_adxl372_set_odr
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:
	movq	_ADXL372_BW_3200HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_adxl372_set_bandwidth
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_adxl372_set_activity_time_ms
	testl	%eax, %eax
	js	LBB0_13
## %bb.11:
	movq	%rbx, %rdi
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_adxl372_set_inactivity_time_ms
	testl	%eax, %eax
	js	LBB0_13
## %bb.12:
	movq	_ADXL372_FULL_BW_MEASUREMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_adxl372_set_op_mode
	jmp	LBB0_13
LBB0_2:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADXL372_DEVID,4,2              ## @ADXL372_DEVID
	.comm	_ADXL372_DEVID_VAL,4,2          ## @ADXL372_DEVID_VAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid chip id %x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ADXL372_RESET,4,2              ## @ADXL372_RESET
	.comm	_ADXL372_RESET_CODE,4,2         ## @ADXL372_RESET_CODE
	.comm	_ADXL372_STANDBY,4,2            ## @ADXL372_STANDBY
	.comm	_ADXL372_ACTIVITY,4,2           ## @ADXL372_ACTIVITY
	.comm	_ADXL372_INACTIVITY,4,2         ## @ADXL372_INACTIVITY
	.comm	_ADXL372_LOOPED,4,2             ## @ADXL372_LOOPED
	.comm	_ADXL372_ODR_6400HZ,4,2         ## @ADXL372_ODR_6400HZ
	.comm	_ADXL372_BW_3200HZ,4,2          ## @ADXL372_BW_3200HZ
	.comm	_ADXL372_FULL_BW_MEASUREMENT,4,2 ## @ADXL372_FULL_BW_MEASUREMENT
	.no_dead_strip	_adxl372_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adxl372_setup
_adxl372_setup:                         ; @adxl372_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _ADXL372_DEVID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADXL372_DEVID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_13
; %bb.1:
	ldr	w2, [sp, #12]
Lloh3:
	adrp	x8, _ADXL372_DEVID_VAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADXL372_DEVID_VAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_12
; %bb.2:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _ADXL372_RESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADXL372_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _ADXL372_RESET_CODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADXL372_RESET_CODE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_regmap_write
	tbnz	w0, #31, LBB0_13
; %bb.3:
Lloh12:
	adrp	x8, _ADXL372_STANDBY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ADXL372_STANDBY@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_adxl372_set_op_mode
	tbnz	w0, #31, LBB0_13
; %bb.4:
Lloh15:
	adrp	x8, _ADXL372_ACTIVITY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ADXL372_ACTIVITY@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1
	mov	w4, #1000
	bl	_adxl372_set_activity_threshold
	tbnz	w0, #31, LBB0_13
; %bb.5:
Lloh18:
	adrp	x8, _ADXL372_INACTIVITY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ADXL372_INACTIVITY@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1
	mov	w4, #100
	bl	_adxl372_set_activity_threshold
	tbnz	w0, #31, LBB0_13
; %bb.6:
Lloh21:
	adrp	x8, _ADXL372_LOOPED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ADXL372_LOOPED@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_adxl372_set_act_proc_mode
	tbnz	w0, #31, LBB0_13
; %bb.7:
Lloh24:
	adrp	x8, _ADXL372_ODR_6400HZ@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ADXL372_ODR_6400HZ@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_adxl372_set_odr
	tbnz	w0, #31, LBB0_13
; %bb.8:
Lloh27:
	adrp	x8, _ADXL372_BW_3200HZ@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ADXL372_BW_3200HZ@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_adxl372_set_bandwidth
	tbnz	w0, #31, LBB0_13
; %bb.9:
	mov	x0, x19
	mov	w1, #1
	bl	_adxl372_set_activity_time_ms
	tbnz	w0, #31, LBB0_13
; %bb.10:
	mov	x0, x19
	mov	w1, #10000
	bl	_adxl372_set_inactivity_time_ms
	tbnz	w0, #31, LBB0_13
; %bb.11:
Lloh30:
	adrp	x8, _ADXL372_FULL_BW_MEASUREMENT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ADXL372_FULL_BW_MEASUREMENT@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_adxl372_set_op_mode
	b	LBB0_13
LBB0_12:
	ldr	w0, [x19, #4]
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh35:
	adrp	x8, _ENODEV@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ADXL372_DEVID,4,2              ; @ADXL372_DEVID
	.comm	_ADXL372_DEVID_VAL,4,2          ; @ADXL372_DEVID_VAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid chip id %x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ADXL372_RESET,4,2              ; @ADXL372_RESET
	.comm	_ADXL372_RESET_CODE,4,2         ; @ADXL372_RESET_CODE
	.comm	_ADXL372_STANDBY,4,2            ; @ADXL372_STANDBY
	.comm	_ADXL372_ACTIVITY,4,2           ; @ADXL372_ACTIVITY
	.comm	_ADXL372_INACTIVITY,4,2         ; @ADXL372_INACTIVITY
	.comm	_ADXL372_LOOPED,4,2             ; @ADXL372_LOOPED
	.comm	_ADXL372_ODR_6400HZ,4,2         ; @ADXL372_ODR_6400HZ
	.comm	_ADXL372_BW_3200HZ,4,2          ; @ADXL372_BW_3200HZ
	.comm	_ADXL372_FULL_BW_MEASUREMENT,4,2 ; @ADXL372_FULL_BW_MEASUREMENT
	.no_dead_strip	_adxl372_setup
.subsections_via_symbols
