	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kmx61_data_rdy_trigger_set_state
_kmx61_data_rdy_trigger_set_state:      ## @kmx61_data_rdy_trigger_set_state
	.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	%esi, %r13d
	movq	%rdi, %r12
	callq	_iio_trigger_get_drvdata
	movq	%rax, %rdi
	callq	_kmx61_get_data
	movq	%rax, %rbx
	movq	%rax, %r15
	addq	$12, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	testl	%r13d, %r13d
	je	LBB0_1
LBB0_4:
	cmpq	%r12, 24(%rbx)
	je	LBB0_7
## %bb.5:
	cmpq	%r12, 32(%rbx)
	jne	LBB0_6
LBB0_7:
	movq	_KMX61_ACC@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	cmpq	$0, 40(%rbx)
	je	LBB0_4
## %bb.2:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movl	$0, (%rbx)
	xorl	%r13d, %r13d
	jmp	LBB0_21
LBB0_6:
	movq	_KMX61_MAG@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_kmx61_set_power_state
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	cmpq	%r12, 24(%rbx)
	je	LBB0_12
## %bb.11:
	cmpq	%r12, 16(%rbx)
	je	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_kmx61_setup_any_motion_interrupt
	jmp	LBB0_14
LBB0_12:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_kmx61_setup_new_data_interrupt
LBB0_14:
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	cmpq	%r12, 24(%rbx)
	je	LBB0_17
## %bb.18:
	cmpq	%r12, 16(%rbx)
	je	LBB0_19
## %bb.20:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	jmp	LBB0_21
LBB0_9:
	movl	%eax, %r13d
	jmp	LBB0_21
LBB0_15:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_kmx61_set_power_state
	jmp	LBB0_21
LBB0_17:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rbx)
	jmp	LBB0_21
LBB0_19:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rbx)
LBB0_21:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KMX61_ACC,4,2                  ## @KMX61_ACC
	.comm	_KMX61_MAG,4,2                  ## @KMX61_MAG
	.no_dead_strip	_kmx61_data_rdy_trigger_set_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kmx61_data_rdy_trigger_set_state
_kmx61_data_rdy_trigger_set_state:      ; @kmx61_data_rdy_trigger_set_state
	.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	x20, x1
	mov	x22, x0
	bl	_iio_trigger_get_drvdata
	bl	_kmx61_get_data
	mov	x21, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_mutex_lock
	cbz	w20, LBB0_8
LBB0_1:
	ldr	x9, [x21, #24]
Lloh0:
	adrp	x8, _KMX61_ACC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KMX61_ACC@GOTPAGEOFF]
	cmp	x9, x22
	b.eq	LBB0_3
; %bb.2:
	ldr	x9, [x21, #32]
Lloh2:
	adrp	x10, _KMX61_MAG@GOTPAGE
Lloh3:
	ldr	x10, [x10, _KMX61_MAG@GOTPAGEOFF]
	cmp	x9, x22
	csel	x8, x8, x10, eq
LBB0_3:
	ldr	w24, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	bl	_kmx61_set_power_state
	tbnz	w0, #31, LBB0_15
; %bb.4:
	ldr	x8, [x21, #24]
	cmp	x8, x22
	b.eq	LBB0_11
; %bb.5:
	ldr	x8, [x21, #16]
	cmp	x8, x22
	b.eq	LBB0_11
; %bb.6:
	mov	x0, x21
	mov	x1, x20
	bl	_kmx61_setup_any_motion_interrupt
	mov	x23, x0
	tbz	w0, #31, LBB0_12
LBB0_7:
	mov	x0, x21
	mov	w1, #0
	mov	x2, x24
	bl	_kmx61_set_power_state
	b	LBB0_18
LBB0_8:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_1
; %bb.9:
	ldr	w8, [x21]
	cbz	w8, LBB0_1
; %bb.10:
	mov	w23, #0
	str	wzr, [x21]
	b	LBB0_18
LBB0_11:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	bl	_kmx61_setup_new_data_interrupt
	mov	x23, x0
	tbnz	w0, #31, LBB0_7
LBB0_12:
	ldr	x8, [x21, #24]
	cmp	x8, x22
	b.eq	LBB0_16
; %bb.13:
	ldr	x8, [x21, #16]
	cmp	x8, x22
	b.eq	LBB0_17
; %bb.14:
	str	w20, [x21]
	b	LBB0_18
LBB0_15:
	mov	x23, x0
	b	LBB0_18
LBB0_16:
	str	w20, [x21, #4]
	b	LBB0_18
LBB0_17:
	str	w20, [x21, #8]
LBB0_18:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_KMX61_ACC,4,2                  ; @KMX61_ACC
	.comm	_KMX61_MAG,4,2                  ; @KMX61_MAG
	.no_dead_strip	_kmx61_data_rdy_trigger_set_state
.subsections_via_symbols
