	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9553_conf_gpio
_mma9553_conf_gpio:                     ## @mma9553_conf_gpio
	.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	%rdi, %rbx
	movq	_MMA9551_APPID_PEDOMETER@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_IIO_ACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_mma9553_is_any_event_enabled
	movl	%eax, %r15d
	movq	_IIO_STEPS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IIO_NO_MOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_DIR_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_mma9553_get_event
	movq	%rax, %r12
	movq	(%rax), %rax
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	testq	%rax, %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.2:
	movq	_MMA9553_MASK_STATUS_MRGFL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_MMA9553_MASK_STATUS_STEPCHG@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_MMA9553_MASK_STATUS_ACTCHG@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	_MMA9553_STATUS_TO_BITNUM
	movq	%rax, %r13
LBB0_7:
	xorl	%r14d, %r14d
	cmpq	%r13, (%rbx)
	je	LBB0_16
## %bb.8:
	testl	%r15d, %r15d
	jne	LBB0_10
## %bb.9:
	cmpq	$0, (%r12)
	je	LBB0_11
LBB0_10:
	leaq	16(%rbx), %rsi
	leaq	12(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_mma9553_read_activity_stepcnt
	testl	%eax, %eax
	js	LBB0_15
LBB0_11:
	movl	8(%rbx), %edi
	movq	_MMA9553_DEFAULT_GPIO_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMA9553_DEFAULT_GPIO_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_mma9551_gpio_config
	testl	%eax, %eax
	js	LBB0_15
## %bb.12:
	movq	%r13, (%rbx)
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_MMA9551_APPID_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_MMA9551_APPID_PEDOMETER,8,3    ## @MMA9551_APPID_PEDOMETER
	.comm	_IIO_ACTIVITY,4,2               ## @IIO_ACTIVITY
	.comm	_IIO_STEPS,4,2                  ## @IIO_STEPS
	.comm	_IIO_NO_MOD,4,2                 ## @IIO_NO_MOD
	.comm	_IIO_EV_DIR_NONE,4,2            ## @IIO_EV_DIR_NONE
	.comm	_MMA9553_MASK_STATUS_MRGFL,4,2  ## @MMA9553_MASK_STATUS_MRGFL
	.comm	_MMA9553_MASK_STATUS_STEPCHG,4,2 ## @MMA9553_MASK_STATUS_STEPCHG
	.comm	_MMA9553_MASK_STATUS_ACTCHG,4,2 ## @MMA9553_MASK_STATUS_ACTCHG
	.comm	_MMA9551_APPID_NONE,8,3         ## @MMA9551_APPID_NONE
	.comm	_MMA9553_DEFAULT_GPIO_PIN,4,2   ## @MMA9553_DEFAULT_GPIO_PIN
	.comm	_MMA9553_DEFAULT_GPIO_POLARITY,4,2 ## @MMA9553_DEFAULT_GPIO_POLARITY
	.no_dead_strip	_mma9553_conf_gpio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma9553_conf_gpio
_mma9553_conf_gpio:                     ; @mma9553_conf_gpio
	.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
Lloh0:
	adrp	x8, _MMA9551_APPID_PEDOMETER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMA9551_APPID_PEDOMETER@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
Lloh3:
	adrp	x8, _IIO_ACTIVITY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IIO_ACTIVITY@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_mma9553_is_any_event_enabled
	mov	x21, x0
Lloh6:
	adrp	x8, _IIO_STEPS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IIO_STEPS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _IIO_NO_MOD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_NO_MOD@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _IIO_EV_DIR_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IIO_EV_DIR_NONE@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_mma9553_get_event
	mov	x22, x0
	ldr	x8, [x0]
	cbz	w21, LBB0_3
; %bb.1:
	cbz	x8, LBB0_5
; %bb.2:
Lloh15:
	adrp	x8, _MMA9553_MASK_STATUS_MRGFL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MMA9553_MASK_STATUS_MRGFL@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	cbz	x8, LBB0_15
; %bb.4:
Lloh17:
	adrp	x8, _MMA9553_MASK_STATUS_STEPCHG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMA9553_MASK_STATUS_STEPCHG@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh19:
	adrp	x8, _MMA9553_MASK_STATUS_ACTCHG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMA9553_MASK_STATUS_ACTCHG@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	bl	_MMA9553_STATUS_TO_BITNUM
	mov	x23, x0
LBB0_7:
	ldr	x8, [x19]
	cmp	x8, x23
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_14
LBB0_9:
	cbnz	w21, LBB0_11
; %bb.10:
	ldr	x8, [x22]
	cbz	x8, LBB0_12
LBB0_11:
	add	x1, x19, #16
	add	x2, x19, #12
	mov	x0, x19
	bl	_mma9553_read_activity_stepcnt
	tbnz	w0, #31, LBB0_14
LBB0_12:
	ldr	w0, [x19, #8]
Lloh21:
	adrp	x8, _MMA9553_DEFAULT_GPIO_PIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MMA9553_DEFAULT_GPIO_PIN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _MMA9553_DEFAULT_GPIO_POLARITY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MMA9553_DEFAULT_GPIO_POLARITY@GOTPAGEOFF]
Lloh26:
	ldr	w4, [x8]
	mov	x2, x20
	mov	x3, x23
	bl	_mma9551_gpio_config
	tbnz	w0, #31, LBB0_14
; %bb.13:
	mov	w0, #0
	str	x23, [x19]
LBB0_14:
	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_15:
	mov	x23, #0
Lloh27:
	adrp	x8, _MMA9551_APPID_NONE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MMA9551_APPID_NONE@GOTPAGEOFF]
Lloh29:
	ldr	x20, [x8]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MMA9551_APPID_PEDOMETER,8,3    ; @MMA9551_APPID_PEDOMETER
	.comm	_IIO_ACTIVITY,4,2               ; @IIO_ACTIVITY
	.comm	_IIO_STEPS,4,2                  ; @IIO_STEPS
	.comm	_IIO_NO_MOD,4,2                 ; @IIO_NO_MOD
	.comm	_IIO_EV_DIR_NONE,4,2            ; @IIO_EV_DIR_NONE
	.comm	_MMA9553_MASK_STATUS_MRGFL,4,2  ; @MMA9553_MASK_STATUS_MRGFL
	.comm	_MMA9553_MASK_STATUS_STEPCHG,4,2 ; @MMA9553_MASK_STATUS_STEPCHG
	.comm	_MMA9553_MASK_STATUS_ACTCHG,4,2 ; @MMA9553_MASK_STATUS_ACTCHG
	.comm	_MMA9551_APPID_NONE,8,3         ; @MMA9551_APPID_NONE
	.comm	_MMA9553_DEFAULT_GPIO_PIN,4,2   ; @MMA9553_DEFAULT_GPIO_PIN
	.comm	_MMA9553_DEFAULT_GPIO_POLARITY,4,2 ; @MMA9553_DEFAULT_GPIO_POLARITY
	.no_dead_strip	_mma9553_conf_gpio
.subsections_via_symbols
