	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9553_write_event_config
_mma9553_write_event_config:            ## @mma9553_write_event_config
	.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
	movl	%r8d, %r14d
	movl	%ecx, %r12d
	movq	%rsi, %rbx
	callq	_iio_priv
	movq	%rax, %r15
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	%rax, %rdi
	movl	%r12d, %ecx
	callq	_mma9553_get_event
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorl	%r12d, %r12d
	cmpl	%r14d, (%rax)
	je	LBB0_10
## %bb.3:
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	4(%r15), %edi
	movl	%r14d, %esi
	callq	_mma9551_set_power_state
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%r14d, (%rbx)
	movq	%r15, %rdi
	callq	_mma9553_conf_gpio
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_4:
	movl	%eax, %r13d
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %r13d
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:
	movl	$0, (%rbx)
	movl	4(%r15), %edi
	xorl	%esi, %esi
	callq	_mma9551_set_power_state
LBB0_9:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r13d, %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mma9553_write_event_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma9553_write_event_config
_mma9553_write_event_config:            ; @mma9553_write_event_config
	.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	x20, x4
	mov	x21, x3
	mov	x22, x1
	bl	_iio_priv
	mov	x19, x0
	ldp	w2, w1, [x22]
	mov	x3, x21
	bl	_mma9553_get_event
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	w8, [x0]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.2:
	mov	w21, #0
	b	LBB0_11
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_4:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x19, #4]
	mov	x1, x20
	bl	_mma9551_set_power_state
	tbnz	w0, #31, LBB0_7
; %bb.5:
	str	w20, [x22]
	mov	x0, x19
	bl	_mma9553_conf_gpio
	tbnz	w0, #31, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w21, #0
	b	LBB0_11
LBB0_7:
	mov	x21, x0
	b	LBB0_10
LBB0_8:
	mov	x21, x0
	cbz	w20, LBB0_10
; %bb.9:
	str	wzr, [x22]
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_mma9551_set_power_state
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_11:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mma9553_write_event_config
.subsections_via_symbols
